In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
The following mainly brings you the CentOS7.7 system to use yum to achieve MySQL 5.7 installation, I hope these contents can bring you practical use, which is also the main purpose of this article that I edit CentOS7.7 system to use yum to achieve MySQL 5.7 installation. All right, don't talk too much nonsense, let's just read the following.
1. Delete the MariaDB-related components built into CentOS 7.7:
# rpm-qa | grep-I mariadb--> mariadb-libs-5.5.64-1.el7.x86_64
# rpm-e-nodeps mariadb-libs-5.5.64-1.el7.x86_64
If you have previously installed MySQL, uninstall: # rpm-qa | grep-I mysql
If there is a / etc/my.cnf configuration file, delete: # rm-rf / etc/my.cnf first
2. Install mysql57-community-release-el7.rpm:
# rpm-ivh http://repo.mysql.com/mysql57-community-release-el7.rpm
Note: mysql-community-source.repo and mysql-community.repo will be generated in the / etc/yum.repos.d directory after installation
3. Install MySQL:
# yum list all | grep mysql-community
# yum-y install mysql-community-client mysql-community-common mysql-community-devel mysql-community-libs mysql-community-libs-compat mysql-community-server mysql-community-test
4. Initialize MySQL:# mysqld-initialize-user=mysql-datadir=/var/lib/mysql
Note: make sure the / var/lib/mysql directory is empty before initialization
5. Modify / etc/my.cnf configuration file:
# mv / etc/my.cnf / etc/my.cnf.bak
# vim / etc/my.cnf
[mysqld]
Port=3306
Socket=/var/lib/mysql/mysql.sock
Datadir=/var/lib/mysql
Pid-file=/var/run/mysqld/mysqld.pid
Log-error=/var/log/mysqld.log
Lower_case_table_names=1
Character_set_server=utf8mb4
Collation_server=utf8mb4_general_ci
Innodb_file_per_table=1
Skip_name_resolve=1
Slow_query_log=1
Slow_query_log_file=mysql-slow.log
Symbolic-links=0
Explicit_defaults_for_timestamp=1
Server_id=1
Sync_binlog=1
Innodb_flush_log_at_trx_commit=1
Log_bin=mysql-bin
Log_bin_index=mysql-bin.index
Binlog_format=row
6. Start the MySQL service:
# systemctl start mysqld.service
# systemctl status mysqld.service
# ps aux | grep mysqld
# ss-tunlp | grep 3306
# tail-100 / var/log/mysqld.log
7. Configure MySQL service to boot automatically: # systemctl enable mysqld.service
8. Check the initial password of the root@localhost user: # grep password / var/log/mysqld.log
9. Configure MySQL Security Wizard: # mysql_secure_installation
10. Authorize root users to log in remotely:
# mysql-uroot-p
Mysql > create user root@'192.168.0.%' identified by '123456'
Mysql > grant all on *. * to root@'192.168.0.%'
Mysql > flush privileges
11. Use Navicat Premium to connect to MySQL:
For the above about the CentOS7.7 system using yum to achieve MySQL 5.7 installation, we do not think it is very helpful. If you need to know more, please continue to follow our industry information. I'm sure you'll like it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.