What is MySQL?
MySQL is an open source relational database management system (RDBMS) that uses the most commonly used database management language-Structured Query Language (SQL) for database management. MySQL is open source, so anyone can download it under the General Public License and modify it according to individual needs. MySQL has attracted much attention because of its speed, reliability and adaptability. Most people think that MySQL is the best choice for managing content without transaction processing.
1. How to download MySQL?
There are two formats for MySQL installation, one is msi format and the other is zip format. For the msi format, install it according to the installation prompts given. If it is in the zip format, decompress it after downloading, and then perform certain configuration after decompression. Both formats are available on the official website. I downloaded the zip format, and I downloaded the latest 8.0.18 official website. The interface provides the latest 8.0.19, which may not be the best in the short term.
1. Baidu search mysql
2. Enter MySQL official website
3. Click DOWNLOADS
4. Scroll down to find MySQL Community (GPL) Downloads >>, click enter
5. Select MySQL Community Server, click enter
6. The interface provides the latest version, select other Version, choose to click Archives
7. Choose the version and system, I chose the latest version 8.0.18, Windows system, click Download to download, the first one is OK
8. After downloading, unzip, you can see that these folders are included after opening And files
Two. Configure the initialization of the my.ini file
1. There is no my.ini file in the mysql directory after decompression, we need to manually create it, this is a configuration file
2. Copy the following statement in this configuration file, the modified need is basedir and datadir on line 5 and line 7, Is to modify the location of mysql
Three. MySQL initialization, installation, start
During installation, in order to avoid errors, we use the administrator to run cmd
1. Type cmd in the computer search box, run as administrator
2. Initialize, install, start
(1) Open cmd and enter the mysql bin directory: cd C: \ Users \ dell \ Downloads \ mysql-8.0.18-winx64 \ bin
(2) mysql initialization, execute the command in the bin directory of mysql: mysqld --initialize --console, root @ localhost in the display: mysql is behind The initial password does not include the preceding space
(3) Install the mysql service, continue to type: mysqld --install, display Service successfully installed. Description successful installation
(4) After the service installation is successful, type the command: net start mysql, start the MySQL service , Suggesting that MySQL is starting up and has started successfully
4. MySQL connects to Navicat for MySQL, changes the initial password, and stops the service
(1) Type mysql -u root -p, prompt Enter password: enter the initial password just now, the result prompts an error, this is because the password has expired
(2) You can use the type: mysqladmin -uroot -p password to solve, enter the initial password first , then enter your new password, confirm and then enter a new password, where password use a combination of numbers and letters safer, I enter a six-digit number easy to remember, later suggesting that unsafe, so set your password using combinations
( 3) To stop the MySQL service, type: net stop mysql
(4) Because each time the data is queried, it is particularly inconvenient to enter the library list form to access the dos interface, so people develop some management terminals and connect MySQL to the management terminal. Easy to operate
(5) Navicat for MySQL is a management terminal for MySQL developed by people in the industry
(6) Establish a connection:
(1) Any connection name, write a random
(2) Host, the port defaults to 3306, the user name defaults to root, You don't need to change these three
(3) The password is the new password you set
(4) The connection test shows that the connection is successful
(7) The connection is successful.
If you think Help you, just like it! Encounter any of the above problems, please leave a message, I will reply when I see it!