There are two ways to install MySQL 5.7. One is to download the installer and click to install. The other is to download the compressed package, unzip it directly, configure it and run it. I personally prefer the compressed package format, so this article also records the installation (configuration) in the compressed package format. https://dev.mysql.com/downloads/mysql/ The latest one I downloaded is mysql-5.7.17-win32.zip Compress to the mysql-5.7.17-win32 folder. The files and folders mentioned later are all updated in this directory. Configure the bin directory behind the environment variable path Mine is ;D:\mysql-5.7.17-win32\bin Copy the my-default.ini file and rename it to my.ini The default file is all commented out, so don't worry about it. Add the following parameters directly at the end [mysqld] port=3306 basedir=D:\mysql-5.7.17-win32 datadir=D:\mysql-5.7.17-win32\data skip-grant-tables Note that the red path is changed to your own directory The skip-grant-tables configuration item is very important. It is used to skip the login verification. Because you just installed it, you don't know what account to use to log in to MySQL. People who have used MySQL before may know the root account, but it is not possible to log in with root at this time. Then open cmd implement mysqld install MySQL --defaults-file="D:\mysql-5.7.17-win32\my.ini" //You can use mysqld remove to delete. You need to reinstall every time you modify my.ini After success, you can start mysql implement net start mysql //The shutdown command is net stop mysql This will report The MySQL service cannot be started. The service did not report any errors. You have to execute mysqld --initialize-insecure This command will create a data folder in the mysql root directory Then execute net start mysql This time it worked implement mysql -u root -p Enter No need to enter the password, just press Enter Successfully logged into mysql Then use mysql //Enter the mysql database Set root password update user set authentication_string = password('root'), password_expired = 'N', password_last_changed = now() where user = 'root'; Note that authentication_string was password before 5.7 If you need a remote client connection, you can execute Grant all on *.* to 'root'@'%' identified by 'root' with grant option; In this way, you can connect to this mysql remotely, otherwise you can only connect locally The above is what the editor introduced to you about MySQL 5.7 installation. The MySQL service cannot be started, but the service does not report any errors. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
>>: A complete tutorial on using axios encapsulation in vue
Mysql Workbench is an open source database client...
Table of contents Overview 1. Acquisition and pro...
1. The difference between Http and Https HTTP: It...
Automatically discover disks Configuration Key Va...
The so-called container actually creates a readab...
General mobile phone style: @media all and (orien...
Last time, a very studious fan asked if it was po...
When the server needs to be started during develo...
1. Find duplicate rows SELECT * FROM blog_user_re...
Web Services are concerned with application-to-ap...
Table of contents background Implementation ideas...
First, install openssh-server in docker. After th...
Docker is divided into CE and EE. The CE version ...
Prelude We all know that nginx is an excellent re...
When inserting data, I found that I had never con...