Detailed windows installation mysql8

MySQL installation process is relatively cumbersome, in order to save time after installation, the installation process is detailed summarized as follows:

1> download the corresponding version

Download: https: //dev.mysql.com/downloads/mysql/

2> to decompress the downloaded .zip file to the directory you want to install, create an empty file called data folder and a my.ini file in the directory

3> configuration my.ini initialization file, as follows:

  View Code

The installation directory structure is as follows:

4> cmd to open a command window as an administrator, execute the following command to switch to the bin directory of MySQL:

 1) mysqld --initialize --console Enter -> Initialize MySQL environment, this time there will be an initial password, followed root @ localhost: After, you need to remember

 2) mysqld install Enter -> install mysql

 3) net start mysql Enter -> Start MySQL server
 4) mysql -u root -p Enter -> allow clients to connect to mysql, this time will let you enter the password, the password to copy and paste the above
 5 need to reset their own password after) entering the
    ALTER USER 'root' @ 'localhost ' IDENTIFIED BY ' new password';

 6) When the server needs to be installed under mysql plurality of different versions, examples, as follows:

mysqld --defaults-file=E:\soft\VertrigoServ\Mysql\my.ini --initialize --console

mysqld install MySQL2 --defaults-file=E:\soft\VertrigoServ\Mysql\my.ini

net start MySQL2

At this point you need to specify the my.ini file, and the contents of the file basedir, datadir, port and other configuration items need to make changes

5> mysql commonly used commands:

1) Input net stop mysql to stop the service.

Tips means that the user can not use the grant to create, mysql8.0 previous versions can use the grant to create a user implicitly authorized when, after 8.0 is no longer supported, so you must first create the user, then the authorization, the command is as follows:

mysql> CREATE USER 'root'@'%' IDENTIFIED BY 'Hadoop3!';
Query OK, 0 rows affected (0.04 sec)

mysql> grant all privileges on *.* to 'root'@'%';
Query OK, 0 rows affected (0.03 sec)

In addition, if a remote connection when the newspaper plugin caching_sha2_password could not be loaded this error, you can try to change the password encryption plug-ins:

 mysql> alter user 'root'@'%' identified with mysql_native_password by 'Hadoop3!';

 

Guess you like

Origin www.cnblogs.com/cyl048/p/11305642.html