In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you this time is how to install MySQL5.6.40 under CentOS7 64, the article is rich in content, interested friends can come to understand, I hope you can get something after reading this article.
MySQL5.6.40 installation process under CentOS7 64
1) Uninstall the previously installed mysql
Rm-rf / usr/local/mysqlrm-rf / etc/init.d/mysqld
2) Delete the database directory
Rm-rf / data/mysql/
3) install the dependency package after uninstalling to avoid problems during installation
Yum-y install wget vim bash-completionyum-y install gcc gcc-c++ cmake ncurses-devel autoconf perl perl-devel
4) download mysql-5.6.40.tar.gz
Wget https://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.40.tar.gz
5) create mysql installation directory, data storage directory and user groups
Mkdir-p / usr/local/mysql/datagroupadd mysqluseradd-r-g mysql mysql
6) extract the files to the current folder and install
Tar-zxvf mysql-5.6.40.tar.gzcd mysql-5.6.40cmake. -DCMAKE_INSTALL_PREFIX=/usr/local/mysql\ # default installation directory-DINSTALL_DATADIR=/usr/local/mysql/data\ # database storage directory-DDEFAULT_CHARSET=utf8\ # use utf8 characters-DDEFAULT_COLLATION=utf8_general_ci\ # check characters-DEXTRA_CHARSETS=all\ # install all extensions Extended character set-DENABLED_LOCAL_INFILE=1 # allows importing data from local make & & make install
7) set directory permissions
Cd / usr/local/mysqlchown-R mysql:mysql. Chown-R mysql:mysql data
8) add mysql startup service to system service
Sp support-files/my-default.cnf / etc/my.cnf
9) create the underlying table
. / scripts/mysql_install_db-- user=mysql
10) just add the configuration environment variable
Vim / etc/profileexport MYSQL_HOME= "/ usr/local/mysql" export PATH= "$PATH:$MYSQL_HOME/bin" #: wq save exit source / etc/profile
11) add the mysql startup file to the system startup file
Cp support-files/mysql.server / etc/init.d/mysql
12) mysql commands under centOS7
Systemctl start mysqlsystemctl restart mysqlsystemctl stop mysqlsystemctl enable mysql
13) modify the mysql password
Mysqladmin-u root password
14) Connect mysql
Mysql-uroot-p * # enter password exit # exit after reading this article on how to install MySQL5.6.40 under CentOS7 64, if you think the article is well written, you can share it with more people.
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.