Closed sunmingtao closed 2 years ago
Restart the server with command mysqld --skip-grant-table --console
In another command line window
mysql
use mysql
UPDATE user SET `authentication_string` = PASSWORD('root') WHERE `User` = 'root';
In the first command line window, start mysql normally by mysqld --console
In the second command line window
mysql -u root -p
(Enter password: root)
SET PASSWORD = PASSWORD('root');
This step is necessary if getting the following error when attempting to connect to the server through MySql Workbench.
you must reset your password using alter user statement before executing this statement
The problem might not have occurred if the db was initialized using the command
mysqld --initialize-insecure
https://github.com/sunmingtao/sample-code/issues/123
Download mysql5.7 zip Unzip Run
mysqld --initialize
Start the servermysqld --console
In another command line, attempt to access the servermysql -u root -p
Tried both password
root
and no password. Not working