Home > Daily Programming > Mysql Knowledge > What are the detailed steps to install mysql?

What are the detailed steps to install mysql?

coldplay.xixi
Release: 2020-06-11 17:34:00
Original
7438 people have browsed it

What are the detailed steps to install mysql?

What are the detailed steps to install mysql?

The detailed steps to install mysql are:

MySQL download

Enter the official website of the page, find the download page and pull down the page , find the image below, and click DownloadWindows (x86, 64-bit), ZIP Archive.

What are the detailed steps to install mysql?

Then we will unzip the downloaded ZIP package

What are the detailed steps to install mysql?

MySQL installation

1. Open the command line as an administrator and enter the decompression root directory/bin directory

What are the detailed steps to install mysql?

2. Create the configuration file my.ini. There is no decompression file by default. We can create a new one and add it to the decompression root directory. (Create a new text document and change the suffix to .ini) Then we edit this file and set the MySQL root directory and the directory where the database data is stored.

What are the detailed steps to install mysql?

When setting basedir and datadir, please note that if you use "\", please use double "\\" to split the directory. If you do not use this, you can use a single "/ ”

3. Initialize the MySQL data directory, that is, initialize the datadir we configured, execute the command administrator cmd> mysqld --initialize

and then a bunch of files will be generated in the data directory

4. Obtain the random password for the initialization database. After executing the previous step, the file generated in the data directory has an .err file, which contains the initialization password. We edit open this file and find the password. The file naming rule is [computer username.err] as shown below

What are the detailed steps to install mysql?

Our initialization random password this time is: kdpsvo&9S4r>

5. Install the MySQL service , Administratorcmd> mysqld --install mysql8.0

What are the detailed steps to install mysql?

6. Start the mysql service, Administratorcmd> net start mysql8. 0

Then wait for the message that the service has been successfully started, as shown below

What are the detailed steps to install mysql?

7. Log in with the root account and random password to connect to the MySQL administratorcmd> mysql -u root -p

Then enter the random password above to log in successfully

What are the detailed steps to install mysql?

8. Change the random password to rootmysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'root';Query OK, 0 rows affected(0.04sec);

Then exit, log in again with the new password, and you are done

Recommended tutorial: "mysql video tutorial"

The above is the detailed content of What are the detailed steps to install mysql?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template