This article shares the installation and configuration method of MySQL 8.0.16 compressed package for your reference. The specific content is as follows Operating environment: Windows 10 x64 1. Download the zip installation package: MySQL8.0 For Windows zip package download address:, you don’t need to log in after entering the page. Then click “No thanks, just start my download.” at the bottom to start downloading. 2. Installation 2.1 Unzip the zip package to the installation directory I unzipped it in E:\SQL\MySQL\mysql-8.0.16-winx64 ps: After decompression, the data folder and my.ini configuration file are missing. Add the unzipped bin path to the environment variable path 2.2 Configure the initialization my.ini file Note: Be sure to open the folder extension Add my.ini to the installation root directory (create a new text file and change the file type to .ini) and write the basic configuration: [mysqld] # Set port 3306 port=3306 # Set the installation directory of MySQL basedir=E:\SQL\MySQL\mysql-8.0.16-winx64 # Change according to your own address # Set the storage directory of MySQL database datadatadir=E:\SQL\MySQL\mysql-8.0.16-winx64\data # Change according to your own address # 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 2.3 Create a new data directory 3. Install MySQL During installation, you must run cmd as an administrator, otherwise an error will be reported during installation, resulting in installation failure. 3.1 Initialize the database Execute the command in the bin directory of the MySQL installation directory: mysqld --initialize --console The red one is the password. Be sure to copy it to another place for later use, otherwise you will have to start over. 3.2 Installation Service Execute the command in the bin directory of the MySQL installation directory: mysqld --install [service name] # The service name behind it can be omitted, the default name is mysql. After the installation is complete: Start the MySQL service by running the command net start mysql Stop the MySQL service by running the command net stop mysql If you need to uninstall the previous MySQL, you can uninstall the MySQL service through the command sc delete MySQL / mysqld -remove 4. Change your password Execute the command in the bin directory of the MySQL installation directory: mysql -u root -p At this time, you will be prompted to enter a password. Remember the password you entered during the installation in step 3.1 above. Fill it in to log in successfully and enter the MySQL command mode. If you insert such an error: Enter password: ************ ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061) Win + r, enter services.msc to start the mysql service The installation is now complete; 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. If the operation is correct, you will be prompted with "Query OK, 0 rows affected (0.01 sec)" Type '\t' to exit mysql, or type help to select help. PS: Here we go, this is always done with the console, there is a graphical interface Go to Baidu to download Navicat, everything can be solved 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 Linux tee command usage
>>: Writing a shell script in Ubuntu to start automatically at boot (recommended)
The establishment of MySQL index is very importan...
Table of contents Written in front Requirements A...
Install MySQL and keep a note. I don’t know if it...
Table of contents 1. Check the number of Linux bi...
Table of contents Tomcat Download Tutorial Tomcat...
1. Install mysql5.6 docker run mysql:5.6 Wait unt...
Table of contents 1. Introduction 2. RC and RR is...
There are many tools available for backing up MyS...
Copy code The code is as follows: <select> ...
I will explain the installation of MySQL under Wi...
For security reasons, MySql-Server only allows th...
Table of contents JS function call, apply and bin...
In order to download this database, it takes a lo...
1. Docker network management 1. Docker container ...
HTML is made up of tags and attributes, which are...