Step 1: Get the MySQL YUM source Go to the MySQL official website to obtain the RPM package download address https://dev.mysql.com/downloads/repo/yum/ Right click and copy the link address https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm Get the address of the rpm package Step 2: Download and install MySQL source First download the mysql source installation package -bash: wget: command not found Let's install wget first Then execute Install mysql source Step 3: Install MySQL online If there are a lot of downloads, please wait a little longer. Step 4: Start the Mysql service Step 5: Set up startup systemctl enable mysqld systemctl daemon-reload Step 6: Change the root local login password After mysql is installed, a temporary default password is generated for root in the /var/log/mysqld.log file. The password here is: xtqh0Neteu=7 mysql -u root -p Enter password: Enter the temporary password to enter the mysql command line; Change the password to LCode1996. (Note that the default password policy of MySQL 5.7 requires that the password must be a combination of uppercase and lowercase letters, numbers and special letters, and at least 8 characters) Step 7: Set up remote login Mysql does not allow remote login by default, we need to set it up and open port 3306 in the firewall; mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'LCode1996.' WITH GRANT OPTION; Query OK, 0 rows affected, 1 warning (0.05 sec) mysql> exit; Bye Exit next; [root@localhost ~]# firewall-cmd --zone=public --add-port=3306/tcp --permanent success [root@localhost ~]# firewall-cmd --reload success [root@localhost ~]# Open port 3306 Step 8: Configure the default encoding to UTF-8 Modify the /etc/my.cnf configuration file and add the encoding configuration under [mysqld] as follows: [mysqld] character_set_server=utf8 init_connect='SET NAMES utf8' [root@localhost ~]# vi /etc/my.cnf After editing and saving, restart the mysql service: systemctl restart mysqld Check out the following code: mysql> show variables like '%character%'; Step 9: Testing We use the local sqlyog to remotely connect to the mysql in the virtual machine At this point, the Mysql installation and configuration is complete; You may also be interested in:
|
<<: Implementation of socket options in Linux network programming
>>: Example of using swiper plugin to implement carousel in Vue
Table of contents Join syntax: 1. InnerJOIN: (Inn...
1. First, create the corresponding folder accordi...
Purchase Certificate You can purchase it from Ali...
<br />This section introduces how to impleme...
As shown below: nsenter -t 1 -m -u -n -i sh -c &q...
1. Disk partition: 2. fdisk partition If the disk...
Table of contents Write docker-compose.yml Run do...
Generate a certificate chain Use the script to ge...
The steps of docker packaging Python environment ...
This article example shares the specific code of ...
In daily development tasks, we often use MYSQL...
Table of contents 1. The origin of fork 2. Early ...
As a useful terminal emulator, Xshell is often us...
Nowadays, copying websites is very common on the I...
1. Grid layout (grid): It divides the web page in...