1. New Features MySQL 5.7 is an exciting milestone. Based on the default InnoDB engine, it adds new features such as SSL, JSON, and virtual columns. Compared with postgreSQL and MariaDB, MySQL5.7 has done a lot of "shortcomings-making" operations. 2. Upgrade Operation 1. Uninstall the old version 1.1. View MySQL rpm -qa|grep mysql rpm -qa|grep mariadb 1.2. Uninstall MySQL rpm -e --nodeps mysql-5.1.73-7.el6.x86_64 rpm -e --nodeps mysql-connector-odbc-5.1.5r1144-7.el6.x86_64 rpm -e --nodeps mysql-libs-5.1.73-7.el6.x86_64 rpm -qa|grep mysql 1.3. Delete the data directory ls -l /var/lib|grep mysql rm -rf /var/lib/mysql The data directory can be backed up and moved away. When the mysqld service is initialized, it checks whether the data directory exists. If the data directory does not exist, mysqld creates it. If the data directory exists and is not empty (that is, it contains files or subdirectories), mysqld displays an error message and terminates: 2. Install MySQL 5.7 2.1. Unzip MySQL 5.7 tar -xvf mysql-5.7.14-1.el6.x86_64.rpm-bundle.tar By the way, the installation environment is CentOS6.5, so the el6 installation package should be used; CentOS7 should use the el7 installation package. If the system version corresponding to the installation package is incorrect, a dependency error related to glibc will appear during installation: warning: mysql-community-libs-5.7.14-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY 2.2. Install the rpm packages in sequence according to the dependencies The dependencies are common→libs→client→server rpm -ivh mysql-community-common-5.7.14-1.el6.x86_64.rpm rpm -ivh mysql-community-libs-5.7.14-1.el6.x86_64.rpm rpm -ivh mysql-community-client-5.7.14-1.el6.x86_64.rpm rpm -ivh mysql-community-server-5.7.14-1.el6.x86_64.rpm Don't be lazy, the client also needs to be installed... 3. Initialize MySQL 5.7 3.1. Start the mysqld service cd ../sbin is the /usr/sbin directory service mysqld start No manual initialization is required, the startup time is long, please wait patiently 3.2. Check the running status of mysqld service mysqld status At this point, we can determine that MySQL has been basically installed successfully. 3.3. Find the temporary login password vi /var/log/mysqld.log You can also use this command to find it more quickly: cat /var/log/mysqld.log | grep password. Once you find the random password, you can log in to MySQL. 3.4. Login mysql -uroot -p 4. Configure MySQL remote access 4.1. Change the root password alter user 'root'@'localhost' identified by 'abc@123'; After 5.6, MySQL has a built-in password enhancement mechanism, and low-strength passwords will report an error: ERROR 1819 (HY000): Your password does not satisfy the current policy requirements 4.2. Add remote login user use mysql; GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'abc@123' WITH GRANT OPTION; '%' represents any address, you can also specify an IP 4.3. Check the user table and refresh memory permissions select host, user from user; FLUSH PRIVILEGES; 4.4. Set up a firewall vi /etc/sysconfig/iptables Before -A RH-Firewall-1-INPUT -j REJECT –reject-with icmp-host-prohibited, add -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT 4.5. Restart the firewall service iptables restart 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:
|
<<: Vue uses monaco to achieve code highlighting
>>: How to build a complete samba server in Linux (centos version)
This article shows you how to use CSS to create a...
Use of AES encryption Data transmission encryptio...
Version Chain In InnoDB engine tables, there are ...
1. Use of alias The alias command is used to set ...
Toy Story 3 Online Marketing Website Zen Mobile I...
Use javascript to implement a fixed sidebar, for ...
There are three ways to introduce CSS: inline sty...
FTP is mainly used for file transfer, and is gene...
I started learning MySQL recently. The installati...
By right-clicking the source file, the following c...
In this post, we’ll use the :placeholder-shown ps...
(P4) Web standards are composed of a series of sta...
1. Use CSS Copy code The code is as follows: style...
Add the jvm.options file to the elasticsearch con...
I found an example when I was looking for a way t...