Because I need to install MySQL, I record the installation process as follows. While recording it myself, I hope it will be helpful to those who have questions. 1. Download the software 1. Go to the MySQL official website, log in to your Oracle account (register one if you don’t have one), and download Mysql-5.7.15 from: http://dev.mysql.com/downloads/mysql/ 2. Unzip the downloaded file to the specified directory. I unzipped it in D:\mysql-5.7.15-winx64 2. Installation Process 1. First configure the environment variable path and configure D:\mysql-5.7.15-winx64\bin to your own path. The details will not be described in detail again. 2. Copy my-default.ini in the decompression path and change the name to my.ini as shown below 3. Open the file my.ini and add the following content: [mysqld] basedir=D:\\mysql-5.7.15-winx64 datadir=D:\\mysql-5.7.15-winx64\\data port=3306 sql_mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" Where basedir: is the decompression path of the above mysql datadir: Subsequent initialization and other data will be saved in this directory (Note: Do not create a new data folder in this file directory. My new data folder will be wrong. Follow my steps and it will be automatically created in subsequent operations.) 3. Initialize the database and configure related information 1. Run the Windows command line as an administrator (special reminder: WIN7 and above systems must use administrator identity here, otherwise subsequent operations will go wrong) 2. Enter the mysql decompression directory D:\mysql-5.7.15-winx64\bin (Reminder: You need to enter the bin directory here, otherwise subsequent operations will cause errors) 3. Enter: mysqld --initialize --user=mysql --console, and initialize after execution. At this time, the initial password of root will be generated. Note the initialization password generated at this time. 4. Register the Mysql service. Run the command: mysqld --install MySQL If the prompt "Service successfully installed." appears, it proves that the MySQL service is successfully installed. 5. At this point, you can start the mysql service, net start mysql Users may encounter the following errors: Cause of the error: As mentioned above, when running the installation service command: mysqld --install MySQL, we did not enter the bin directory for installation. 4. Log in to the database and change the password In the my.ini file, add skip-grant-tables after [mysqld] Select mysql database: Query the user table of the MySQL database, select * from user At this point, we find that the name of the password field is authentication_string. Some may be passwords, depending on the results of your query. The operation was successful. Exit mysql Possible subsequent problems: When this problem occurs, you only need to continue running the following two commands in the mysql command line: ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER; flush privileges; Note: The above are 2 commands and need to be executed separately. After completing the above two commands, MySQL is installed completely. Reference: MySQL 5.7.14 Installation and Configuration Methods Graphic Tutorial Wonderful topic sharing: Installation tutorials for different versions of MySQL Installation tutorials for MySQL 5.7 versions Installation tutorials for MySQL 5.6 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 DOM DIFF algorithm in react application
>>: Detailed explanation of bash command usage
Table of contents Optimization of if judgment 1. ...
need: Usually, sites want to prevent videos and p...
v-model is a Vue directive that provides two-way...
This article records the installation and configu...
/******************** * Virtual File System VFS *...
Table of contents Inheritance ES5 prototype inher...
Kubernetes supports three types of authentication...
This article will introduce an interesting pseudo...
Table of contents Base Return Type String and Boo...
need: Merge identical items of one field and sort...
1.vue packaging Here we use the vue native packag...
I encountered a very unusual parameter garbled pro...
Table of contents 1. How to switch 2. Dynamically...
This article example shares the specific code of ...
Basic Concepts By default, Compose creates a netw...