This article records the graphic tutorial of MySQL 8.0.17 installation and configuration for your reference. The specific contents are as follows 1. Download the installation package Download address: installation package 2. Unzip the installation package to the directory Here it is unzipped to D:\mysql-8.0.17-winx64 3. Configure environment variables My Computer → Right click → Properties → Advanced System Settings → Environment Variables Click "Edit" and add the address of the MySQL bin folder 4. Configuration File Create a new my.ini file in the MySQL folder D:\mysql-8.0.17-winx64 and write the following information: [mysqld] # Set port 3306 port=3306 # Set the installation directory of mysql basedir=D:\\mysql-8.0.17-winx64 # Remember to use double slashes \\ here. I will make mistakes with single slashes, but when I look at other people's tutorials, some use single slashes. Try it yourself # Set the storage directory of mysql database data datadir=D:\\mysql-8.0.17-winx64\\Data # Same as above # Allow the maximum number of connections max_connections=200 # The number of connection failures allowed. This is to prevent someone from trying to attack the database system from this host max_connect_errors = 10 # The default character set used by the server is UTF8 character-set-server=utf8 # The default storage engine that will be used when creating a new table default-storage-engine=INNODB # By default, the "mysql_native_password" plug-in is used for authentication. default_authentication_plugin=mysql_native_password [mysql] # Set the default character set of the mysql client to default-character-set=utf8 [client] # Set the default port used by the mysql client to connect to the server port = 3306 default-character-set=utf8 5. Install MySQL Open cmd as an administrator, go to the MySQL installation path, and enter the following command to initialize the database: mysqld --initialize --console Notice! The execution output contains the following paragraph: [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: zyNrYHh2yF-E The "zyNrYHh2yF-E" after root@localhost: is the initial password (excluding the first space). Before changing the password, you need to remember this password as it will be needed for subsequent logins. If you shut down too quickly or forget to remember it, it's okay. Just delete the initialized datadir directory and execute the initialization command again, and it will be regenerated. Of course, you can also use security tools to force a password change, using any method you like. 6. Installation service Enter in the MySQL installation directory D:\mysql-8.0.17-winx64\bin mysqld --install The original command should be: mysqld --install [service name] However, the service name behind it can be omitted, the default name is mysql. Of course, if you need to install multiple MySQL services on your computer, you can distinguish them with different names, such as mysql5 and mysql8. 7. Start MySQL service Start MySQL: net start mysql (Stop the service with the command net stop mysql. Uninstall the MySQL service with the command sc delete MySQL/mysqld -remove) 8. Change your password Enter in the MySQL installation directory D:\mysql-8.0.17-winx64\bin: mysql -u root -p Enter the previous password to enter MySQL. Execute the command in MySQL: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new password'; Change the password. Pay attention to the ";" at the end of the command. This is the syntax of MySQL. Installation Complete You can view the default installed database show databases; Take a look at the default MySQL users: select user,host,authentication_string from mysql.user; The host of the administrator root is localhost, which means that only localhost login access is allowed. If you want to allow other IP addresses to log in, you need to add a new host. If you want to allow all IP access, you can directly change it to "%" For other operations, refer to: MySQL user creation and authorization Wonderful topic sharing: MySQL different versions installation tutorial MySQL 5.7 installation tutorials for various versions MySQL 5.6 installation tutorials for various versions mysql8.0 installation tutorials for various versions The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Detailed explanation of SELINUX working principle
>>: Common problems in implementing the progress bar function of vue Nprogress
This article shares with you the graphic tutorial...
1. Install less dependency: npm install less less...
The vertically adjacent edges of two or more bloc...
If the server's images are hotlinked by other...
grammar: background-image: conic-gradient(from an...
Here are some points to note when registering Tom...
This article example shares the specific code of ...
Implementation principle The main graphics are co...
What does text-fill-color mean? Just from the lit...
Table of contents 1. Introduction to PXC 1.1 Intr...
This article shares the specific code for the WeC...
View installation and uninstallation # View rpm -...
【SQL】SQL paging query summary The need for paging...
In the project, you will encounter custom public ...
Designers have their own font library, which allo...