473,385 Members | 2,069 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Can't connect to MySQL server on 'localhost' (10061)

Hi all,

maybe this isn't a php question, but a MySQL question.

If so I'm sorry for asking you guys to help me :)

I know this question is asked often in NGs, but I couldn't find the
answer that works for me.

I've just installed my server with following:

Apache2, PHP5 and MySQL 4.1.12 on Windows 2000 Server.

Apache and PHP are funtioning properly (I can open a page like
phpinfo() ).

But now i've come upon a problem with MySQL.

When i try to run a simple PHP script like:
mysql_connect("localhost", "root", "password") or die (mysql_error());
I get the following error:
Can't connect to MySQL server on 'localhost' (10061)

I've tried several different addresses like: localhost, 127.0.0.1,
server01, 192.168.0.3 all with same result.

Loopback address should work cause I configured MySQL that way.

The MySQL service is started.

I don't know whether it's a good way to test the MySQL server but on
commandline I typed:
mysql --user=user_name --password=your_password
And I got mysql> commandline.

Can someone please help me find the problem and/or give a better way of
testing.

Thanks in advance for your replies.

P. Hordijk

Jul 17 '05 #1
2 4485
<pi************@hotmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hi all,
When i try to run a simple PHP script like:
mysql_connect("localhost", "root", "password") or die (mysql_error());
I get the following error:
Can't connect to MySQL server on 'localhost' (10061)

I've tried several different addresses like: localhost, 127.0.0.1,
server01, 192.168.0.3 all with same result.


Have you tried plugging in the phrase (in quotes) to Google?

This is a fairly common problem with an easy fix posted on the MySQL manual
pages.

Go to Google & put in: "Can't connect to MySQL server on 'localhost'"
(quotes included) - the answer is one of the top two responses.

It has to do with the passwords & latest versions of MySQL - the page on the
MySQL site you find will tell you how to fix it.
Jul 17 '05 #2
Thanks for your reply!

When i said i searched NGs, I meant I also searched Google (Could be
that I'm so retarded that I overlooked the sollution to my problem
though).

I followed your instruction to enter "Can't connect to MySQL server on
'localhost'" in google and I studied the results, none of them did the
trick for me.

Bout the password thingy: I couldn't find it (but like I said before
that could also be me being retarded), so I'm blushing when I ask you
the following: Can you give me the URL of the site where you found out
bout that password thingy and latest versions.

Do you still think this is a php question or do I need to post in a
MySQL NG?

I know I can be a pain in the ass :), so I thank all for taking the
time to help me.

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Stefan Hinz | last post by:
Degan, jumping in to try and solve some problems that look pretty obvious to me ... > #options for default service (mysqld2) > (mysqld2) It should be , not (mysqld2).
0
by: Steve Carson-Rowland | last post by:
I have tried to install MySQL 4.0.14 on my Pentium 1.7Ghz running WindowsXP Professional. the installation ran through without any problems. However, every command gives an error:...
2
by: Asad Khan | last post by:
Hello, I was using MySQL till a few days ago just fine. Now everytime I try to run it using mysql.exe, I get the following error: "can't connect to mysql server 'localhost' (10061)" What...
2
by: David Ehmer | last post by:
I have installed MySQL on WinXP Pro When attempting to access various commands from the command prompt (eg help, set password etc) I get the following error. ERROR 2003: Can't connect to MySQL...
0
by: Ryan Stewart | last post by:
I'm running MySQL server on a WinXP box at home. I have a cable modem/router. I've set up port forwarding on port 3306 to the machine running MySQL. I can connect locally just fine, but when I try...
4
by: Mondal | last post by:
Hi, I am using MySQL 5.0 beta and Active Python 2.4. I have the correct version of MySQLdb installed. The problem is that I can't connect to MySQL through the Active Python interactive window. ...
1
by: swarajtnj | last post by:
HI Everybody, I am a newly person on MySql Database. I am using ASP.net 2.0 with Using the Database as MySql 5.0. My client server 63.247.82.34. The server previlages as create a database as 2....
2
by: swarajtnj | last post by:
Hi Friends, I am using MySql 5.0. With the Front end as ASP.NET 2.0. I am working a small concern. my company local server to connect the MySql is perfectly working. But when i Connect to the...
2
by: samnav | last post by:
Hello, I know this question was asked many times before but I couldn't find a solution that works for me. I've installed an apache server (2.2.6), PHP (5.2) and MySQL (5.0.45) in my windows XP...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.