This article shares the MySQL installation and configuration tutorial for your reference. The specific contents are as follows 1. Configure MySQL database 1. Unzip the green version of mysql and rename it to mysql5.7, as shown below Compare the previous versions of Figure 5.6 below, which lack the data directory (storing data) and the my-default.ini file (configuration information) 2. Installation Service 1. Run cmd (administrator version, otherwise no permission), as shown below 2. For the new version of MySQL 5.7, there is no data directory. We need to run the command to create it. 3. Run the command mysqld –install to install the service, as shown below: If you don’t need mysql, just run mysqld –remove to remove it, as shown below 3. Run net start mysql to start the service, as shown below If you need to configure whether to start MySQL at boot time, you can configure it in Windows Services. 3. Client Test 1.mysql –uroot –p as shown below 4. Change username and password 1. Run the command use mysql; UPDATE user SET authentication_string=password('123456') where user='root'; FLUSH PRIVILEGES; As shown below: 2. Log in again and run the command mysql -uroot -p123456 5. Configure encoding to UTF-8 1. View the default encoding 2. In the root directory of mysql5.7, create a new my.ini file (this file does not exist after 5.7, create it yourself), as shown below: When the MySQL service program starts, it will automatically read my.ini to obtain various configuration parameters, including encoding 3. Edit my.ini Under the [mysqld] node, configure the server encoding and add two items character_set_server=utf8 [mysql] node, this is to configure the client information We also add the [mysql] node and configure the encoding to UTF8 [mysql] default-character-set=utf8 As shown below: 6. Test query 1. After modifying the configuration file, you must restart the service first 2. Log in as root user normally 3. Run the command show variables like "%character%" to view the system character set variables, as shown below: Wonderful topic sharing: Installation tutorials for different versions of MySQL Installation tutorials for various versions of MySQL 5.7 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:
|
<<: jQuery implements time selector
>>: Detailed explanation of Linux commands and file search
Preface MySQL is the most popular relational data...
Table of contents What is nginx 1. Download the r...
Table of contents Introduction to NIS Network env...
Given a div with the following background image: ...
1. Set CORS response header to achieve cross-doma...
About a year ago, I wrote an article: Analysis of...
There are two common ways to download files in da...
Syntax format: row_number() over(partition by gro...
Table of contents 1. Get the file extension 2. Co...
1. Goal: Change the value of character_set_server...
After installing Jenkins, the initial download of...
Table of contents Mode Parameters HashHistory Has...
Copy code The code is as follows: a:link { font-s...
Table of contents Problem Description 1. Basic so...
Table of contents Rendering Install Code Implemen...