Install MySQL8.0 under Windows10

1: First go to the official website to download the installation package

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

      This is my download version

2: Unzip the decompressed file to the directory you installed: E:\mysql-8.0.11-winx64 (I put it in the root directory of the E drive, not in a directory with Chinese names and spaces. For example )

3: Create a new my.ini file and a data folder under the mysql-8.0.11-winx64 folder

4: Configure the system environment

 

Add %MYSQL_HOME%\bin to path

5: Open the cmd window as an administrator and jump to the path to E:\mysql-8.0.11-winx64\bin

  • Initialization command mysqld --initialize --user=mysql --console

    (Remember to initialize, many people do not initialize, there will be 1067 errors, no matter how to do it)

    After the initialization is completed, a temporary password will be generated. Here you need to pay attention to remember the temporary password (in)

    Then generate some files in your database save directory, don't care

     

  •  Then enter mysqld -install to add the service

  • Enter net start mysql to start the service
  •  Enter mysql -u root -p to log in to the database, when prompted for a password, then log in with the password above

  • Modify password statement: ALTER USER root@localhost IDENTIFIED BY '123456'; Modify password to: 123456

 

Guess you like

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