MySQL5.7.11 database installation

        The author wrote a blog about MySQL installation before . This article is a supplement to the previous article, because this installation encountered different problems, and also corrected some mistakes in the previous article.

        First, you need to create a my.ini (because I installed it in the windows environment) file to configure the mysql database. The following is a simple configuration

port =3306
basedir = D:/servers/database/mysql
datadir = D:/servers/database/mysql/data

#If you don't configure it, you will get an error. This configuration is empty.
early-plugin-load=""
#Comment out the plugin here, if you installed it locally
#keyring_file_data= D:/servers/database/mysql/keyring_3306/keyring

        Note: "/" is strongly recommended for the path in the configuration file, because the use of "\" sometimes results in an error, and characters such as "\s" are sometimes escaped

 

        Many default configurations of MySQL 5.7.11 are used here , but the most basic configurations are provided. The configuration items vary with different versions. It is necessary to adopt the correct and appropriate configuration for the specific version.

        

mysqld -nt --skip-grant-tables

   Start the MySQL database according to the above method. At this time, the root login database does not need a password. After the login is successful, changing the root password is different from the way I mentioned in the previous blog post.

     Executing the mysqld --initialize --console command generates a random temporary password for root to log in to the database. Execute the following command to log into the database

mysql -u root -p

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326449562&siteId=291194637