Mysql_connect System Error 113
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company reading initial communication packet' system error 0 Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs
Lost Connection To Mysql Server At Waiting For Initial Communication Packet System Error 0
Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just
Lost Connection To Mysql Server At Reading Authorization Packet System Error 0
like you, helping each other. Join them; it only takes a minute: Sign up Lost connection to MySQL server at 'reading initial communication packet', system error: 0 up vote 68 down vote favorite 10 I am getting
Lost Connection To Mysql Server At Waiting For Initial Communication Packet System Error 10060
error, "Lost connection to MySQL server at 'reading initial communication packet, system error: 0" while I am going to connect my db. If I am using localhost everything is working fine. But when I am using my live IP address like below, it's getting error: mysql_connect("202.131.xxx.106:xxxx", "xxxx", "xxxxx") or die(mysql_error()); Any help will be appreciated. Thanks. php mysql share|improve this question edited Jan 6 at 7:59 asked Apr 22 '11 at 13:17 Rikesh 19k104266 mysql system error 113 add a comment| 15 Answers 15 active oldest votes up vote 59 down vote accepted Someone here: http://forums.mysql.com/read.php?52,166244,258515#msg-258515 suggests that it might be a firewall problem: I have just had this problem and found it was my firewall. I use PCTools Firewall Plus and it wasn't allowing full access to MySQL. Once I changed that it was fine. Hope that helps. Could that be it? Also, somehere here: http://forums.mysql.com/read.php?52,151255,213970#msg-213970 suggests that it might be because the MySQL server is bound to the loop-back IP (127.0.0.1 / localhost) which effectively cuts you off from connecting from "outside". If this is the case, you need to upload the script to the webserver (which is probably also running the MySQL server) and keep your server host as 'localhost' share|improve this answer answered Apr 22 '11 at 14:07 Thomas Daugaard 793716 8 localhostsolved the problem for me :) –Christian Giupponi Sep 5 '13 at 16:59 4 what do you mean localhost? I am also facing the same problem and using localhost only also. Application is on the same machine as the database. What did you mean localhost? –oneofakind Apr 6 '15 at 1:56 4 @oneofakind He means to connect to 'localhost" instead of '127.0.0.1' –Alex Holsgrove Oct 30 '15 at 11:04 localhost works for me, thx –fengma Sep 5 at 2
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss mysql workbench reading initial communication packet system error 0 the workings and policies of this site About Us Learn more mysql system error 104 about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow mysql system error 102 Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping http://stackoverflow.com/questions/5755819/lost-connection-to-mysql-server-at-reading-initial-communication-packet-syste each other. Join them; it only takes a minute: Sign up Lost connection to MySQL server at 'reading initial communication packet', system error: 0 in connecting to Mysql in cpanel up vote 0 down vote favorite I'm using cPanel server and I'm getting this error. Lost connection to MySQL server at 'reading initial communication packet', system error: 0 http://stackoverflow.com/questions/19654311/lost-connection-to-mysql-server-at-reading-initial-communication-packet-syste Although i read his question Lost connection to MySQL server at 'reading initial communication packet', system error: 0 , I still didn't get the solution. when i run my php code, it returns "Connection successfulLost connection to MySQL server at 'reading initial communication packet', system error: 0" here's the code: $con = mysql_connect('mysite.com:2082', 'me@mysite.com', 'passwordhere', 'dbname'); if (mysqli_connect_errno($con)) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } else { echo "Connection successful"; } if ($selected = mysql_select_db("dbname",$con) or die(mysql_error())){ echo "Your database name is dbname"; } mysqli_close($con); thanks for answering. php mysql share|improve this question asked Oct 29 '13 at 9:31 Jben Kaye 431111 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote accepted I was able to sort it out. here's the code: $con = mysql_connect('localhost', 'serverusername', 'serverpassword'); if (mysqli_connect_errno($con)) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $selected = mysql_select_db("db_name",$con) or die(mysql_error()); share|improve this answer answered Nov 5 '13 at 9:53 Jben Kaye 431111 add a comment| Your Answer
16:23 Hi, I recently swapped out my database server, but migrated over the databases and all database settings to a new one, but I'm not sure that that is when this http://galleryproject.org/node/104686 issue started. Anyway, the issue is this: I'm grtting many (, MANY) lines in my apache2 error.log that look like this: Quote: [Wed Dec 28 11:17:13 2011] [error] [client 66.249.71.211] PHP Warning: mysql_connect(): Lost connection to MySQL server at 'reading initial communication packet', system error: 113 in /home/mobrien/www/gallery2/lib/adodb/drivers/adodb-mysql.inc.php on line 365
I noticed that a google bot is crawling my website system error right now, so that probably has something to do with it. Also, when I try to get into "Maintenance" from the dashboard, I'm getting this error from MODPATH/g2_import/helpers/g2_import.php[ 1250 ] (could it be related?): Quote: 1245function g2() { 1246 $args = func_get_arg(0); 1247 $ret = is_array($args) ? array_shift($args) : $args; 1248 if ($ret) { 1249 Kohana_Log::add("error", "Gallery 2 call failed with: " system error 0 . $ret->getAsText()); 1250 throw new Exception("@todo G2_FUNCTION_FAILED"); 1251 } 1252 if (count($args) == 1) { 1253 return $args[0]; 1254 } else { 1255 return $args; I would love any help on this, so I can stop filling up my apache logs with junk and get the Maint. page working again. Thanks in advance, --mobrien118 Gallery version: 3.0 (Santa Fe) PHP version: 5.3.5-1ubuntu7.4 PHPInfo Link (see FAQ): Webserver: Apache/2.2.17 (Ubuntu) Database: MySQL: 5.1.58-1ubuntu1 Activated toolkits: gd Operating system: Linux Browser: Google Chrome newest beta XUser login Login/Register nivekiam Joined:2002-12-10 Posts:16504 Posted: Wed, 2011-12-28 18:12 Try this: http://www.linuxquestions.org/questions/linux-server-73/lost-connection-to-mysql-server-at-reading-initial-communication-packet-system-err-741347/ Try google. Something is happening between the application and your MySQL server, for some reason your MySQL server is shutting of communication... Check your MySQL logs. Check your other log files you have access to. ____________________________________________ Like Gallery? Like the support? Donate now! mobrien Joined:2005-03-18 Posts:17 Posted: Wed, 2011-12-28 20:05 Yeah, all of the suggestions in that thread are all things i have already set up. As I stated, gallery seems to be working correctly (except for the "maintenance" function). What I failed to mention