MySQL 5.7.18 zip file installation tutorial



MySQL 5.7.18 zip file installation tutorial

Install MySQL: 5.7.18 (please pay attention to the path, do not copy directly)

1. Download

 

2. Unzip it and put it on the designated disk D:\mysql5.7.18 (please refer to your own computer, That is, the decompressed directory)

3. Configure the environment variable MYSQL_HOME:D:\mysql5.7.18 (please refer to your own computer, that is, the decompressed directory)

Add after path;%MYSQL_HOME%\bin 4.Add the file my.ini The file puts the following code into the my.ini file



[mysql]

# Set the default character set of the mysql client

default-character-set=utf8

[mysqld]

# Set the 3306 port

port = 3306

# Set the mysql installation directory

basedir=D:\ mysql5.7.18

# Set the storage directory of the data of the mysql database

datadir=D:\mysql5.7.18\data

# The maximum number of connections allowed

max_connections=200

# The character set used by the server defaults to the 8-bit encoded latin1 character set

character-set- server=utf8

# The default storage engine that will be used when creating new tables

default-storage-engine=INNODB

Dear, please note: basedir and datadir, please modify according to your actual installation directory

Create  an empty data folder, the file list is as follows:

programming development p>5. Open cmd.exe, you must run as an administrator 5.1 Initialize the database mysqld --initialize --user=mysql --console Remember the assigned password: (Note: Press Shift + Ctrl + c on the command line to copy the selected code)

5.2 Install service mysqld --install MySQL

5.3 Start service net start MySQL

then tests

mysql -uroot -pB6eg9YvDVV%v (password randomly generated by the system, if there is no problem, skip to the last step)

=============Gorgeous dividing line====== ====== The

above steps can be installed successfully. The following other commands may be used

. ===Gorgeous dividing line============





6. Possible problems 6.1 msvcp120.dll is missing Install vcredist_x86.exe or vcredist_x64.exe, depending on your system. 6.2 Other problems If you execute the sc delete MySQL command, remember to clear all files in the data folder. If I execute the net start MySQL command, I get: 'The MySQL service is starting. The MySQL service failed to start. The service did not report any errors. ' To configure an environment variable or the environment variable is misconfigured, please double check, dear. 7. Modify the initial password After logging in with the initial password, execute the following command



set password for root@localhost=password('123456');

Guess you like

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