Php Error 10060 Mysql
Contents |
Community Podcasts MySQL.com Downloads Documentation Section Menu: MySQL Forums :: MySQL Administrator :: ERROR 2003: Can't connect to MySQL server (10060) New Topic Advanced Search Solution to Connecting remotely when you get Error 10060 mysql error code 10060 Posted by: Mohamed Infiyaz Zaffer Khalid () Date: December 25, 2008 09:50PM
Cannot Connect To Mysql Server 10061
Hello everyone, this problem is pretty simple to solve. If you're getting error 10060, this means that you ARE NOT
2003, Can't Connect To Mysql Server On (10060)
ALLOWED to access the web server remotely. Usually we (I mean, I) access the mysql databases using php and this is on the SAME server. Thus we use 'localhost' to connect. But if
Aws Mysql 10060
you were to for example access the same web database using a local machine running VB, the story is different. First, here's what you should NOT do. I'm saying this because I noticed some responses had these as action steps. So, 1. DON'T change any ports 2. DON'T close existing ports and reopen new ones as it may affect other apps. 3. DON'T disable any firewalls. mysql workbench connection error 10061 Now here's what you MUST do: 1. on your connection string, make sure that you're using the SERVER'S correct IP. On the other hand, you can use the domain name, and this is what I do. 2. The rest of the parameters are the same. I mean they're what you want or have set. 3. NOW the critical thing. First you've got to tell your web server that you need to accept remote connections. You can easily do this using the cpanel. When you're asked for the remote host name, type in % (the percentage sign) to mean ANY HOST. 4. Finally, you may have to tell the web server's firewall that you're making a remote connection from your machine. To do this, cpanel allows you to add your own IP into a 'white list'. In most cases, cpanel shows you a list of class C IPs and your one should be there. Select it. Save the settings. Now go into your app and run the program - eg: in VB. Should work just fine! Happy coding. Khalid ================================== The Smart Solutions Expert PHP MySQL Javascript VB6 C/C++ http://www.marhaonline.com Edited 1 time(s). Last edit at 12/25/2
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 Business Learn more about hiring developers or posting ads cannot connect to mysql server on localhost 10061 windows 7 with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack mysql cpanel Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign mysql connect error vicidial up Connecting to remote MySQL server using PHP up vote 7 down vote favorite 5 I am attempting to connect to a remote MySQL server from my local machine virtualhost using the following code: $conn = mysql_connect("$dbhost", "$dbuser", "$dbpass") or die(mysql_error()); mysql_select_db($dbname, http://forums.mysql.com/read.php?34,49742,239961 $conn) or die(mysql_error()); My problem is that I am unable to connect locally, receiving the error: Can't connect to MySQL server on 'xxx.xxx.xxx.xxx' (10060) This is not the case when I upload the same PHP file to the server. I am able to query the database with no problems at all. I am unable to connect via command line either, but I can access cPanel which rules out the chance of my IP being banned accidentally. My local server is running PHP 5.2.9, http://stackoverflow.com/questions/1935314/connecting-to-remote-mysql-server-using-php the remote server 5.2.12 php mysql mysql-connect remote-server mysql-error-2002 share|improve this question edited May 14 '11 at 17:25 OMG Ponies 199k37361417 asked Dec 20 '09 at 9:02 BenTheDesigner 1,38111319 add a comment| 3 Answers 3 active oldest votes up vote 13 down vote accepted firewall of the server must be set-up to enable incomming connections on port 3306 you must have a user in MySQL who is allowed to connect from % (any host) (see manual for details) The current problem is the first one, but right after you resolve it you will likely get the second one. share|improve this answer answered Dec 20 '09 at 9:03 Bozho 385k82774946 I created a wildcard user in remote MySQL when the problem first arose, thinking my IP may have changed (which it shouldn't have). I was able to connect to the same server a few days ago so I doubt it is a firewall issue. –BenTheDesigner Dec 20 '09 at 9:06 3 try telnet xx.xx.xx.xx 3306. If it doesn't connect, it's a network issue –Bozho Dec 20 '09 at 9:07 @Bozho: Unable to Telnet in on 3306. As it is shared server I'll have to speak to the host as I don't have access to their network. –BenTheDesigner Dec 20 '09 at 9:18 yes, that's the best thing to do. –Bozho Dec 20 '09 at 9:24 It's possible that the remote server is using a different port. –Jacob Relkin Dec 20
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 http://stackoverflow.com/questions/37008066/mysql-error-2003-hy000-when-im-trying-to-connect-to-remote-mysql this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question http://forum.wampserver.com/read.php?2,61606,61612 x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up connect to mysql ERROR 2003 [HY000] - When i'm trying to connect to remote mysql up vote 1 down vote favorite I have mysql database in shared hosting that defined with % in "remote MySQL" in a Cpanel And I type within CMD: C:\xampp\mysql\bin>mysql -u SiteName_username -p pass_of_mysql -h srv3.linuxisrael.co.il I press ENTER Enter password : I press ENTER P.S - It's right to press connect to mysql here ENTER ? I do not have a password in MySQL installed on my computer And i get : mysql error 2003 (hy000) Can't connect to MySQl server on 'srv3.linuxisrael.co.il' (10060 "Unknown error") And in Laravel 5.1 i get this error: PDOException in Connector.php line 55: SQLSTATE[HY000] [2002] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. it's configured so : env file: APP_ENV=local APP_DEBUG=true APP_KEY= ........... DB_HOST=srv3.linuxisrael.co.il DB_DATABASE= name_of_my_database DB_USERNAME=name_of_database_username DB_PASSWORD=password_of_the_username CACHE_DRIVER=file SESSION_DRIVER=file QUEUE_DRIVER=sync MAIL_DRIVER=smtp MAIL_HOST=mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=null MAIL_PASSWORD=null MAIL_ENCRYPTION=null Routes.php : use App\User; Route::get('/', function(){ User::create(['first_name' => 'moti']); return view('welcome'); }); How can I connect to MySQL? I want to connect through Laravel But I see that it does not work for me even when I try via the CMD What's the solution? thank you very much ! php mysql laravel remote-access shared-hosting share|improve this question edited May 3 at 15:24 asked May 3 at 15:18 Moti Winkler 11611 It looks like there may be a firewall blocking MySQL connections to the hosting server. &