mysql5.7 windows installation

1. Download the archive decompression mysql5.7

2. Configure the environment variable path for the E: \ mysql-5.7.23-winx64 \ bin

3. Initialize the database to get data directory:

   Two kinds of command mode:

          One is to initialize a password-less root

          Another is to initialize a random password root

(1) no password ways:

         mysqld --initialize-insecure

(2) random password of the way, but remember your password immediately:

          mysqld --initialize

          (Random password in your error log inside, which is under the data file for the extension .err file inside, find this sentence A temporary password is generated for root @ localhost: xxxxxxxx, after the colon is your password)

4. Install mysql service: mysqld --install

5. Set the root password:

    set password = password ( 'password you want to set');

Enter appear Query OK, 0 rows affected, 1 warning (0.00 sec) instructions to reset successful   

6. change the password for a period of permanent:

    alter user 'root'@'localhost' password expire never;

Appears Query OK, 0 rows affected (0.00 sec) Description ok.

7.net start mysql service inside or manually to start mysql service

Guess you like

Origin www.cnblogs.com/get-rich/p/11413471.html