Whenever I try to start MySQL by typing
> mysql -u root
I get the error
ERROR 2003(HY000): Can't connect to MySQL server on 'localhost' (10061)
How can I solve the problem above? I just downloaded MySQL and unzipped it in the E: drive. I have not done anything else. Do I have to make a connection first? If so, how can I do that?
Here is the ZIP file that I had downloaded: mysql-5.7.15-winx64.zip
Here are the steps to start MYSQL Server (mysql-5.7.15-winx64) for the first time on Windows:
mysqld --initialize-insecure
or mysqld --initialize
depending on whether you want the server to generate a random initial password for the 'root'@'localhost' account.mysqld --console
You can see the start-up logs being printed.mysql -u root -p
. When prompted, Enter password if it has been set or else just hit "Enter" button to connect