Problem in MySQL 5.5

utkarsh73

Journeyman
Joined
Oct 13, 2011
Messages
248
I just started learning very basic SQL queries yesterday and installed MySQL 5.5 client on my PC. While installing, the software asked for a root password.
Everything was fine yesterday and I made a few databases and tables. But today when I started the command-line client and entered my password, it threw an error like "ERROR 2003 (HY300): Can't connect to MySQL server on 'localhost' -(10061)".

Does anyone know what's the problem and how to solve it? The same issue happened a week ago. Everything worked fine the day I installed MySQL but the next day, it threw same error. So I removed and reinstalled it and this time it accepted the same root password and worked fine for the day. And next day, the same problem again.
 

Garbage

God of Mistakes...
Joined
Dec 26, 2005
Messages
1,896
Can you please tell what command are you using to connect to MySQL?

If you have given password, instead of just using
Code:
mysql -u root -h localhost

try using
Code:
mysql -u root -h localhost -p

Specifying -p will ask you for password.
 
OP
utkarsh73

utkarsh73

Journeyman
Joined
Oct 13, 2011
Messages
248
Sorry for the late reply. I was away from internet for the last four days.

Where exactly do we type these commands?? I tried it in command prompt and in 'run' but didn't worked.

Anyways, The problem is solved now, thanks for the reply. I started the MySQL workbench and started the server in the "Server Administration". Then in the "MySQL 5.5 Command Line Client", I entered the password and the connection was established.
 

cute.bandar

Cyborg Agent
Joined
Jan 27, 2010
Messages
1,129
Try using wamp as an alternative to manually installing php/mysql/apache. Its much easier.
 

nparab

Right off the assembly line
Joined
Aug 30, 2012
Messages
3
Try XAMPP for web development on your PC using PHP, MySQl and other stuff. It saves you a lot of technical hassles. It comes bundled with the Apache Server, MySql, Filezilla, Mercury Mail Server and Tomcat. You can start any of them selectively by just pressing a button in the XAMPP control panel.
 

jagzviruz

Broken In
Joined
Sep 23, 2009
Messages
10
You can run the afore mentioned command in a DOS prompt window. While WAMP and XAMPP are good for easing web-development, its worth your while to learn the basics as well.
 
Top