读取问候数据包时出错 [英] Error while reading greeting packet

查看:155
本文介绍了读取问候数据包时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有问题...正在尝试连接到netbeans中的服务器.... 我将代码编写为以下代码:

i have problem ... im tring to connect to server in netbeans .... I write the code as bellow:

<?php
echo "wlecome";
echo "<br>";

$conn=mysqli_connect("mydomain.com:2082", "phpmyadmin_user", "password","database_name");

echo $conn;
?>

运行此代码将返回以下错误信息:

runing of this code return this erreurs:

wlecome

Warning: mysqli_connect(): MySQL server has gone away in C:\xampp\htdocs\myprojet\index.php on line 10

Warning: mysqli_connect(): Error while reading greeting packet. PID=1092 in C:\xampp\htdocs\myprojet\index.php on line 10

Warning: mysqli_connect(): (HY000/2006): MySQL server has gone away in C:\xampp\htdocs\myprojet\index.php on line 10

Fatal error: Maximum execution time of 30 seconds exceeded in C:\xampp\htdocs\myprojet\index.php on line 10

我在Google上搜索了很多,但是要么我使用了错误的关键字,要么互联网上没有简单的解决方案.我希望这里有人可以帮助我.

I googled a lot, but either I used the wrong keywords or there are no simple solutions on the internet. I hope somebody here can help me.

最诚挚的问候和谢意,法德尔.

Best regards and thanks in advance, Fadel.

推荐答案

出于安全原因,可以将MySQL配置为不接受外部连接.通过说完整域名,您正在使用公共IP,因此您是外部连接.如果MySQL与您的网络服务器在同一盒中运行,则只需通过以下域名即可访问它:

MySQL can be configured to not accept external connections, for security reasons. By saying the full domain name, you are using the public IP and therefore you are an external connection. If MySQL is running on the same box as your webserver, just access it via this domain name:

localhost:2082

这篇关于读取问候数据包时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆