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
Table of contents introduce Link start Continue t...
Redis uses the apline (Alps) image of Redis versi...
This article tests the environment: CentOS 7 64-b...
Recently, I have implemented such an effect: clic...
1. Document flow and floating 1. What is document...
!DOCTYPE Specifies the Document Type Definition (...
The best thing you can do for your data and compu...
Table of contents Preface optimization SSR Import...
This article shares the specific code of js to ac...
For example, there is an input box <el-input r...
Preface If the query information comes from multi...
This article describes the MySQL transaction mana...
Overview Nginx can use variables to simplify conf...
1. Copy the configuration file to the user enviro...
Introduction After compiling, installing and solv...