MySQL zip version installation

Original link:

https://www.cnblogs.com/lxlin/p/9635350.html

https://baijiahao.baidu.com/s?id=1630347658327095638&wfr=spider&for=pc

     1. Download the free installation version of the zip file on the MySQL official website (this article takes mysql-5.7.14-winx64.zip as an example)

     2. Unzip the zip file to the local, this article unzip to the following directory: D:\softwares\mysql-5.7.14-winx64

     3. Create a new configuration file (my.ini) to configure the character set, port and other information to overwrite the original configuration file (my-default.ini). Of course, you can also modify the default configuration file. Create a new folder data to store MySQL data. as follows:

         

 

          Copy the following to the newly created configuration file, where basedir and datadir set the mysql folder path:

          [mysql]
         # Set the default character set of the mysql client
         default-character-set=utf8 
         [mysqld]
         #Set 3306 port
         port = 3306 
         # Set the mysql installation directory

         basedir=D:\\softwares\\mysql-5.7.14-winx64
         # Set the storage directory of mysql database data
         datadir=D:\\softwares\\mysql-5.7.14-winx64\\data

         # Maximum number of connections allowed
         max_connections=200
         # The character set used by the
         server defaults to UTF8 character-set-server=utf8
         # The default storage engine that will be used when creating a new table
         default-storage-engine=INNODB

     4. Enter cmd, run the console as an administrator, enter the MySQL path (D:\softwares\mysql-5.7.14-winx64\bin), and run the mysqld install command. Note: You need to run as an administrator here, otherwise the prompt is as follows:

       

     5. Execute mysqld --initialize to automatically create the data folder and its files.

     6. Execute mysqld install to install.

     7. Start the mysql service.

        


       8. Go to the generated data directory, find the .err file, and check the initial password. And log in through the command mysql -u root -p

       9. After setting ok, execute mysql -u root -p and press Enter and enter the password to log in to mysql

           

       10. Change the password after successful login ALTER USER'root'@'localhost' IDENTIFIED BY'root';

 

Guess you like

Origin blog.csdn.net/u010472858/article/details/108315442