Error 10013 Mysql
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 error 10013 an attempt was made About Us Learn more about Stack Overflow the company Business Learn more about error 10013 in function bind permission denied hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss
Windows Error 10013
Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up MySQL Can't connect to server on localhost with PHP up vote 1 down vote favorite I'm using XAMPP 1.7.2 and can connect to MySQL via cmd and SQLYog, but not programmatically. This PHP code: $conn = mysql_connect('localhost', 'root', '*****'); if (!$conn) { die('Could not connect: '. mysql_error()); } gives me: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'localhost' (10013) in C:\test\login.php on line 10 Could not connect: Can't connect to MySQL server on 'localhost' (10013) How do I debug this issue? php mysql xampp share|improve this question edited Oct 3 '12 at 0:33 Kenny 98021028 asked Mar 17 '12 at 20:06 Rahul 72641436 Where is the code that tries to connect? –Jon Mar 17 '12 at 20:08 edited the question to add the database connection code –Rahul Mar 17 '12 at 20:10 1 try defining the port... localhost:10013 –phpmeh Mar 17 '12 at 20:14 By default root doesn't have a password and you have to start MySQL server separately. –PhpXp Mar 17 '12 at 20:17 @phpmeh can you please elaborate on "try defining the port" –Rahul Mar 17 '12 at 20:19 | show 3 more comments 3 Answers 3 active oldest votes up vote 0 down vote Your connection shows an Error #10013. It's basically a firewall problem or socket error. Maybe your mysql setup is not on default port? (which is 3306) share|improve this answer answered Mar 17 '12 at 20:15 hjpotter92 44.2k146191 its on default port (which is 3306) –Rahul Mar 17 '12 at 20:17 add a co
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > Can't connect to MySQL server on 'localhost' (10013) Want to Advertise Here? Solved Can't connect to MySQL server on 'localhost' (10013) Posted on 2006-02-12 PHP 2 Verified Solutions 17 Comments 6,780 Views Last Modified: 2013-12-12 Hi, Just been reinstalling apache, mysql, and php. I used to have mysql 4.0.25 but now I've installed 4.1 maybe this is the problem. On my index.php http://stackoverflow.com/questions/9753285/mysql-cant-connect-to-server-on-localhost-with-php page, I try to connect to mysql server using mysql_connect() but it throws this error: Can't connect to MySQL server on 'localhost' (10013) I can verify that mysql server is running, because I can get into it from the command line. I have set the username and password in my mysql_connect() function call to the same as I use from the command line,, but do I have to hash the password somehow? Well I'm a little stuck, and a little https://www.experts-exchange.com/questions/21734036/Can't-connect-to-MySQL-server-on-'localhost'-10013.html confused because it used to work fine but I have been forced to re-install windows xp. Thanks for your help, :Ant 0 Question by:antum Facebook Twitter LinkedIn Google LVL 29 Active 1 day ago Best Solution byfibo ok "start" menu, "config panel", "windows firewal", "exceptions" select "display notification..." in the "program and services" widows, look for Apache. select it, "modify", "range modify" and check Go to Solution 17 Comments LVL 33 Overall: Level 33 PHP 12 Message Expert Comment by:sajuks2006-02-12 try resetting ur password Connect to the mysqld server with this command: shell> mysql -u root #Issue the following statements in the mysql client: mysql> UPDATE mysql.user SET Password=PASSWORD('newpwd') -> WHERE User='root'; mysql> FLUSH PRIVILEGES; Replace “newpwd” with the actual root password that you want to use. and then try to connect... how dows ur conenct string look like $conn = mysql_connect('localhost', 'username', 'password') ; if (!$conn) { echo mysql_error(); } did u alos verify if ur windows firewall blocking the mysql port ?? 0 Message Author Comment by:antum2006-02-12 Hi, How do I check if firewall is blocking/allowing the 3306 port? Thanks, :Ant 0 LVL 33 Overall: Level 33 PHP 12 Message Expert Comment by:sajuks2006-02-12 In Control Panel click the Windows Firewall icon Once the Windows Firewall Window opens click the Exceptions tab Click the Add Port button In the Dialog box
Author Message svankamon-Joined: 01 Apr 2007Posts: 148Location: Chesterfield UK Posted: Fri Apr 13, 2007 5:37 pm Post subject: MySQL Connection Problem Error 10013 Hi, ive searched http://aprelium.com/forum/viewtopic.php?t=12617 the folum and founs simplar problems but nothing like this so here goes. Im trying to create a database for a ads section on my site. When i type the adress URL in i get the folowing error message: [b]Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'localhost' (10013) in L:\abysswebserver\htdocs\kam\classifieds\config\configSql.php on line 13 Failed to connect to host "Can't error 10013 connect to MySQL server on 'localhost' (10013)[/b] I have instaled php preconfigured which has mysql installed at default. Php fast cgi is running in my windows processes, but no mysql???? Back to top cmxflash-Joined: 11 Dec 2004Posts: 872 Posted: Fri Apr 13, 2007 5:50 pm Post subject: Apreliums PHP package comes with support for MySQL, not with the MySQL server itself. error 10013 mysql You'll have to install and configure the MySQL server before you attempt to connect to it using PHP. Back to top svankamon-Joined: 01 Apr 2007Posts: 148Location: Chesterfield UK Posted: Fri Apr 13, 2007 5:55 pm Post subject: Thanks, il try it, i have it on my pc but not configured, not surre how to do that Back to top svankamon-Joined: 01 Apr 2007Posts: 148Location: Chesterfield UK Posted: Fri Apr 13, 2007 5:58 pm Post subject: Does mysql 5 server need configuring to abyss web server, if so do you know how i can find out about setting it up.? Back to top AbyssUnderground-Joined: 31 Dec 2004Posts: 3855 Posted: Fri Apr 13, 2007 6:19 pm Post subject: Follow the tutorials on www.abyssunderground.co.uk_________________Andy (AbyssUnderground) (previously The Inquisitor) www.abyssunderground.co.uk Back to top Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 YearOldest FirstNewest First Aprelium Forum Index -> Databases All times are GMT + 1 Hour Page 1 of 1 Jump to:Select a forumMiscellaneous----------------Forum Rules [READ THIS IF YOU ARE A NEW USER]AnnouncementsWeb Technologies----------------PHPPerlASP.NETClassic ASPFastCGI/CGIDatabasesWeb De