1

I am trying to connect the MySQL server (mysql-5.7.23) from command prompt using the command mysql -u root it throws an error ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061). I am using Windows 10.

I have followed following steps :

  1. Unzip the mysql-5.7.23 file and put on C drive.
  2. Add the data folder in the installation directory and also add the my.ini
  3. Went to the bin folder in command prompt and executed mysqld --initialize-insecure, it generated some file in the data folder.
  4. Then I added the mysql path environment variable.
  5. After that I started MySQL service. It is running properly.
  6. Again in the command prompt, I have executedmysqld --install, it shows service already exists.
  7. But when I tried to connect to the server, it throws an error, ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

I have tried all solutions from ERROR 2003 (HY000): Can't connect to MySQL server on localhost (10061) , but still it is not working.

Am I missing something?

Edit : One more observation, when I execute mysqld, the cursor in the command prompt return to again current directory, which I think is not expected behavior.

Suhas Bhattu
  • 539
  • 4
  • 17

0 Answers0