Mysql 5.7.17 decompression version (ZIP version) installation steps

From: http://www.bkjia.com/Mysql/1187691.html





download


Decompressed version download address (requires login): http://dev.mysql.com/downloads/mysql/ After



downloading, unzip it to the one you want to install The directory is enough.



Configure environment variables


For convenience, you don't have to add environment variables every time you enter the bin directory. If you don't mind the trouble, you don't have to add them.

Add system environment variables: MYSQL_HOME, the value is your MySQL directory, for example: D:\ tools\database\mysql-5.7.17-winx64



Append %MYSQL_HOME%\bin after the path variable; note the semicolon in front;

initialize the database to get the data directory.


Two command methods: one is to initialize a root without password, the other is to initialize A random password root


passwordless method

mysqld --initialize-insecure random password method, but remember the password

mysqld --initialize to initialize the data directory

Configure the my.imi file


mainly to configure basedir, datadir, port, after 5.7 Some configurations are not recognized. For example: default-character-set=utf8 #Installation

directory
basedir = D:\\tools\\database\\mysql-5.7.17-winx64 #Database

storage directory
datadir = D:\\tools\\database\\mysql-5.7.17-winx64\\data #Port

port
= 3306

Note: The point to note here is that the use of \\ for the interval identifier of the directory may appear unrecognized on win7

Add service


Enter the command

mysqld -install in the bin directory to

start the service


Enter the command

net start mysql

to log in to the database and change the password


Enter the database, because there is no password, press Enter to enter

mysql -u root -p to modify the root password

set password = password ('New password');

Exit and test the password The pit



encountered encountered a pit


during installation, which is a pit on win7, and this pit will not appear when I test on win10; this doubt is really puzzled;

The MySQL service is starting.
The MySQL service failed to start.
The service did not report any errors.
Please type NET HELPMSG 3534 for more help. This situation is encountered here because the directory separator is not used in the my.imi configuration. \\ is re-initialized after the change;


because it has been initialized once before, the data directory should be emptied before this initialization, otherwise the execution will not be executed. After successfully



emptying the data directory, reinitialize it.



Summary

The above is the whole content of this article. I hope the content of this article can bring some help to your study or work. If you have any questions, you can leave a message to exchange.

Guess you like

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