In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces how to use YUM to install MySQL 5.6 under CentOS7. The article is very detailed and has certain reference value. Interested friends must read it!
CentOS7 under the use of YUM installation MySQL 5.6 method.
rpm -qa | grep mysql
If it returns null, MySQL is not installed.
Note: In the new version of CentOS 7, the default database has been updated to Mariadb, not MySQL, so executing yum install mysql updates Mariadb database only and does not install MySQL.
(2) Check the installed Mariadb database version.
rpm -qa|grep -i mariadb
(3) Uninstall the installed Mariadb database.
rpm -qa|grep mariadb|xargs rpm -e --nodeps
(4) Check the installed Mariadb database version again to confirm that the uninstall is complete.
rpm -qa|grep -i mariadb
(5) Download the installation package file.
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
(6) Install mysql-community-release-el7-5.noarch.rpm package
rpm -ivh mysql-community-release-el7-5.noarch.rpm
After installation, mysql-community.repo and mysql-community-source.repo will be added to the/etc/yum.repos.d/directory.
Execute yum repolist all| The grep mysql command looks at the available mysql installation files.
6) Install MySQL.
yum install mysql-server
(7) Check if MySQL is installed successfully.
rpm -qa | grep mysql
(8) Start MySQL service.
systemctl start mysqld.service #Start mysqlsystemctl restart mysqld.service #Restart mysqlsystemctl stop mysqld.service #Stop mysqlsystemctl enable mysqld.service #Set mysql startup
mysql common file path:
/etc/my.cnf This is mysql's main configuration file
/var/lib/mysql The database file location of mysql database
The requested URL/var/logs/log.jpg was not found on this server.
9) Set password.
After mysql 5.6 is installed, its root user password is empty by default. We need to log in as mysql root user in time (enter directly for the first time without entering password) and modify the password.
# mysql -u rootmysql> use mysql;mysql> update user set password=PASSWORD("Enter root password here") where User='root'; mysql> flush privileges;
(10) Set up remote host login
mysql> GRANT ALL PRIVILEGES ON *.* TO 'your username'@'%' IDENTIFIED BY 'your password';
Execute the following command to add remote login capability to root.
mysql> GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY "123456";
The above is "CentOS 7 under how to use YUM installation MySQL 5.6" all the content of this article, thank you for reading! Hope to share the content to help everyone, more relevant knowledge, welcome to pay attention to the industry information channel!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.