1, Mysql download
- Address: dev.mysql.com/downloads/m…
- Installation advice: Since the learning video is three years old, it is not recommended to install version 8.0, but I installed the latest version 8.0.25
2. Installation and login
- Select your own folder and run CMD as administrator
- Execute command:
// Change the file directory:
cd C:\web\mysql-8.011.\bin
// Initialize the database:
mysqld --initialize --console
// Remember to copy the initial password here after root@localhost:
/ / loginMysql -h host name -u user name -p/ / exit
exit
// You are advised to change the initial password because it is cumbersome
alter user 'root'@'localhost' identified by 'newpassword';
// remember the SQL statement with; At the end
// The service starts
net start mysql
// Stop the service
net stop mysql
Copy the code
3. Visual tool connection
- Navicat (friend asked for a cracked version)
- Connection problems :(inconsistent password encryption methods caused by an earlier version of mysql)
// Solution:
// The password must be set to null first
alter user 'root'@'localhost' identified by 'YouPassword (empty)';
// Then change the password
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'NewPassword (the password you want to set)';
// Then you can log in with the new password
Copy the code
The original link: blog.csdn.net/xurQQ/artic…
Then you can connect normally, the journey of full stack has just begun, come on!!