Window Mysql5.7 free installation configuration

1, mysql download

        5.7 # 32: Https://Dev.Mysql.Com/get/Downloads/MySQL-5.7/Mysql-5.7.19-Win32.Zip

        5.7 # 64: Https://Dev.Mysql.Com/get/Downloads/MySQL-5.7/Mysql-5.7.19-Winx64.Zip

2, extract to its own directory

        I was here on the D: \ Program Files \ mysql-5.7.19 is.

3. Add the environment variable

        The D: \ Program Files \ mysql-5.7.19 \ bin appended to the path

4, a new my.ini file

        In D: \ Program Files \ mysql-5.7.19 folder below New my.ini file, encoded as ansi, document as follows:

[mysqld] 
# installation directory 
the basedir = D: \ Program Files \ MySQL- 5.7 . . 19 \ 
DATADIR = D: \ Program Files \ MySQL- 5.7 . . 19 \ Data \ 
Port = 3306 
Skip -grant- Tables 
#basedir showing the installation path mysql 
#datadir represent mysql data file storage path 
#port represent mysql port 
#skip -grant-the Tables omit the password

5, install mysql

        In the cmd command (administrator privileges) , enter D: \ Program Files \ under mysql-5.7.19 \ bin directory, enter mysqld --install to install; installation is complete displays Service successfully installed.

6, initialization data file

        Input mysqld --initialize-insecure --user = mysql; to initialize

7, start mysql service

        Enter net start mysql to start mysql service

8, landing mysql

        Enter mysql -u root -p and press Enter to display the password, you can directly enter.

9, change the root password

        Input:

update mysql.user set authentication_string=password('liguoqing') where user='root' and Host = 'localhost';

10, refresh permission

        Input:

flush privileges

11, modify the my.ini file

       Find just new my.ini file, remove the skip-grant-tables this line, can comment out

12, restart the mysql service

       Input:

Stop mysql service: net stop mysql; 
start mysql service: net start mysql;

       Note: You can not directly reboot (restart) under the windows, only the first stop, and then start.

 

Error Solution:

1、Can't connect to MySQL server on 'localhost' (10060)

https://blog.csdn.net/qq_26525215/article/details/53234778

Guess you like

Origin www.cnblogs.com/kawhileonardfans/p/10966818.html