In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
CentOS6.8 manually installs MySQL5.6
Yum install perl libaio
As we all know, there are many unfilled holes after the launch of mysql5.7, and there are also problems with the compatibility of the old system and project, so now the general web project should still run under the environment of centos6.8+mysql5.6. Today, we will mainly talk about the specific steps of how to compile and install mysql5.6.
1. Install mysql5.6 dependency Pack
two。 Download the compilation package
Wget https://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.35-linux-glibc2.5-x86_64.tar.gztar xvf mysql-5.6.35-linux-glibc2.5-x86_64.tar.gz
3. Copy to the specified directory
Mv mysql-5.6.35-linux-glibc2.5-x86_64 / usr/local/mysql
4. Create mysql users and groups
Groupadd mysqluseradd-r-g mysql mysql-d / usr/local/mysqlpasswd mysql
5. Modify directory permissions
Chown-R mysql:mysql / usr/local/mysql
6. Install the database
Su mysql/usr/local/mysql/scripts/mysql_install_db-user=mysql-basedir=/usr/local/mysql-datadir=/usr/local/mysql/dataexit
7. Copy the mysql configuration file
Cd / usr/local/mysql/support-filescp my-default.cnf / etc/my.cnf
8. Add system services
Cp mysql.server / etc/init.d/mysqlchkconfig mysql on
9. Add environment variabl
Vim / etc/profile
Add at the bottom
Export MYSQL_HOME= "/ usr/local/mysql" export PATH= "$PATH:$MYSQL_HOME/bin"
After saving and exiting, execute the effective code
. / etc/profile
10. Start mysql
Service mysql start
11. Set root password
Mysqladmin-u root password '123456'
twelve。 Set the default port
Vim / etc/ my.cnf[mysqld] basedir=/usr/local/mysqldatadir=/usr/local/mysql/dataport=3306server_id=1socket=/tmp/mysql.sock
13. Allow all external links to access (optional)
Mysql-u root-p
Mysql command line input
GRANT ALL PRIVILEGES ON *. * TO 'root'@'%' IDENTIFIED BY' 123456 'WITH GRANT OPTION;FLUSH PRIVILEGES
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.