The installation tutorial of mysql 8.0.11 winx64 is recorded as follows and shared with everyone 1. Enter the address: Download mysql-8.0.11-winx64 2. Unzip the zip package and put the unzipped files into a folder, as shown in the figure: 3. Configure environment variables (to avoid repeatedly switching paths when operating in the CMD window) Add D:\Program Files\mysql-8.0.11-winx64\bin under Path 4. Write the configuration file We found that there is no my.ini (or my-default.ini) file in the unzipped directory. It doesn’t matter, you can create it yourself. Add my.ini in the installation root directory, for example, mine is: D:\Program Files\mysql-8.0.11-winx64\my-default.ini, write the basic configuration: Note: The data folder exists only after the database is initialized. The my-default.ini file does not exist by default. You can write it yourself as follows: [mysqld] # Set port 3306 port=3306 # Set the installation directory of MySQL basedir=D:\Program Files\MySQL # Set the storage directory of MySQL database data datadir=D:\Users\qiuzhiwen\MySQL\Data # Maximum number of connections allowed 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 Among them, basedir and datadir can be determined according to your actual situation! 5. Press the "win" key to open the start menu, enter "cmd" in the search box, select the "Command Prompt" program in the search results, right-click and select "Run as administrator" 6.MySQL service installation and initialization Execute the mysqld install command. When Service successfully installed appears, it means that the MySQL service installation is complete. Note: mysqld --install [service name] 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. Mysql initialization Execute the command in the bin directory of the MySQL installation directory: mysqld --initialize --console After the execution is complete, the initial default password of the root user will be printed, for example: Notice! There is a paragraph in the execution output result: [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: Ng*jbnKGd2_! The "Ng*jbnKGd2_!" 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 accidentally close the directory too quickly or forget to remember it, it's OK. 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. Reference: MySQL 8.0 Reference Manual After the installation is complete, you can start the MySQL service through the command net start mysql . 7. Change password and password authentication plugin Go to D:\Program Files\mysql-8.0.11-winx64\bin, execute the mysql -u root -p command, and then enter the previously saved password. In my case, it is Ng*jbnKGd2_! To change the user password, execute the command in MySQL: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new password'; Modify the password verification plug-in and modify the password at the same time. You can use the command to view the default installed database: show databases; use mysql; show tables; You can see that the MySQL database is initialized by default, and the user table stores MySQL user information. We can take a look at the default MySQL user: 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 "%" Create a user: CREATE USER 'xxh'@'%' IDENTIFIED WITH mysql_native_password BY 'xxh123!@#'; #(Note: the encryption method of mysql8.0 has been changed)# Check user select user, host, plugin, authentication_string from user\G; Authorizing Remote Databases # Authorize all permissions GRANT ALL PRIVILEGES ON *.* TO 'xxh'@'%'; #Authorize basic query and modification permissions, set as required GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER ON *.* TO 'xxh'@'%'; View User Permissions show grants for 'xxh'@'%'; So far, the detailed steps for installing mysql-8.0.11-winx64 on Win10 have been introduced. If there are any mistakes or problems encountered during the installation process, please leave a message in the comment area and LZ will try to answer them! 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:
|
<<: Implementation of one-click packaging and publishing of Vue projects using Jenkins
>>: Detailed explanation of nginx upstream configuration and function
Application software generally has such business ...
The accessibility of web pages seems to be somethi...
Table of contents 1. The magical extension operat...
As shown below: XML/HTML CodeCopy content to clip...
cause The way to import external files into a min...
Table of contents mousejoint mouse joint distance...
Table of contents 1. What is a window function? 1...
Preface Students who learn JavaScript know that A...
Table of contents 1. Introduction 2. Thought Anal...
Install the unzipped version of MySql database un...
Table of contents 1. Operators Summarize 1. Opera...
About JS, CSS CSS: Stylesheet at the top Avoid CS...
Preface It's a cliché. Here I will talk about...
1: Introduction to syslog.conf For different type...
Query mysql operation information show status -- ...