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--
Editor to share with you how to install and configure mysql5.7.18 under centos6.4, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
The specific steps of installing mysql5.7.18 under centos6.4 will be shared with you.
1. First check whether mysql has been installed and find the rpm package of mysql-related software.
# rpm-qa | grep mysql
2. Delete everything related to mysql
# yum-y remove mysql-libs-5.1.66-2.el6_3.x86_64
3. Install the dependency package
# yum-y install make gcc-c++ cmake bison-devel ncurses-devellibaio libaio-devel
4. Create a mysql user group
# groupadd mysql
5. Create a user mysql under the mysql user group
# useradd mysql-g mysql
6. Download mysql-5.7.19-linux-glibc2.12-x86_64.tar.gz from the official website
Download address: https://dev.mysql.com/downloads/mysql/
7. Put mysql-5.7.19-linux-glibc2.12-x86_64.tar under the / opt folder
8. Decompress the file mysql-5.7.19-linux-glibc2.12-x86_64.tar.gz
# tar xzvfmysql-5.7.19-linux-glibc2.12-x86_64.tar.gz
9. Rename mysql-5.7.19-linux-glibc2.12-x86_64 to mysql and move it to / usr/local/mysql
# mv mysql-5.7.19-linux-glibc2.12-x86_64 / usr/local/mysql
Create a data directory under / usr/local/mysql
# mkdir / usr/local/mysql/data
10. Return to the local directory
# cd / usr/local
Change the mysql directory and the following files and subdirectories to mysql.
# chown-R mysql:mysql mysql/
Give 755 permissions to the mysql directory and the following files and subdirectories
# chmod-R 755 mysql/
11. Compile, install and initialize mysql, and remember the password at the end of the command line
# / usr/local/mysql/bin/mysqld-initialize-user=mysql-datadir=/usr/local/mysql/data-basedir=/usr/local/mysql
12. Start the mysql service
# / usr/local/mysql/support-files/mysql.server start
13. Make a soft connection and restart the mysql service
# ln-s / usr/local/mysql/support-files/mysql.server / etc/init.d/mysql#service mysql restart
14. Make a soft link and put the mysql in the installation directory in the / usr/bin directory
# ln-s / usr/local/mysql/bin/mysql / usr/bin
15. Log in to msyql and enter the password (the password is the password generated by initializing step 11)
# mysql-u root-p
16. Change the password to 123456
Msql > alter user 'root'@'localhost' identified by' 123456 causes MySQL > use mysql;msyql > update user set user.Host='%' where user.User='root';mysql > flush privileges;mysql > quit
17. Edit the my.cnf and add a configuration file. The configuration content is
# vi / usr/local/mysql/ my.cnf [mysqld] port = 3306sqlcards moving no codes ENGINEPROBSTITUTION jurisdiction
18. Allow port 3306
# iptables-I INPUT-p tcp-m state-- state NEW-m tcp-- dport 3306-j ACCEPT#iptables-L-n#service iptables save is all the contents of this article "how to install and configure mysql5.7.18 under centos6.4". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow 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.