MySQL installation

1.mysql download

  • Select the corresponding version download address

Here we download mysql-8.0.17-winx64

2. Unzip

  • Unzip and create the root directory after unzip my.ini and data folder

  • basedir: Replace with your own root directory

  • < /ul>

    my.ini:

    [client]# Set the default character set of the mysql client default-character-set=utf8 [mysqld] # Set 3306 port port = 3306# Set mysql installation directory basedir=D:\develop\mysql\mysql-8.0.17-winx64\mysql-8.0.17-winx64# Allow maximum number of connections max_connections=1000max_user_connections=500wait_timeout=200# The character set used by the server defaults to the 8-bit encoding latin1 character set character-set-server=utf8# The default storage engine that will be used when creating a new table default-storage-engine=INNODB

    Share pictures

    3. Open the command line

    < ul>

  • Open the cmd command line tool as an administrator, and switch to the directory bin

4. Initialize the database

mysqld --initialize --console

After success, there will be an initial password, remember this initial password

share picture

5. Install the database

mysqld install

Share picture

6. Start mysql service

net start mysql

Share pictures

7. Log in to mysql and enter the initial password above

mysql -u root -p

Share a picture

8. Set a new password

< pre class="cmd">ALTER?USER?’root’@’localhost’?IDENTIFIED?BY?’123456′;

Here I use the online set password for [email protected] = password('new password'); prompt me that the statement is wrong

Leave a Comment

Your email address will not be published.