In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains how to build mysql5.7.29 in centos7 in linux, the content is clear, interested friends can learn, I believe it will be helpful after reading.
1. Download mysql
two。 Manage group and directory permissions
2.1 decompress mysql
Tar-zxf mysql-5.7.29-linux-glibc2.12-x86_64.tar.gz upload directory / home/tools
2.2 renaming
Mv mysql-5.7.29-linux-glibc2.12-x86_64 mysql-5.7.29
2.3 move the specified directory
Mv mysql-5.7.29 / usr/local/
2.4 add user groups and users
Groupadd mysql
Useradd-r-g mysql mysql
2.5 modify directory permissions
Chown-R mysql:mysql / usr/local/mysql-5.7.29/
3. Install mysql
3.1 configure the mysql service
Cp / usr/local/mysql-5.7.29/support-files/mysql.server / etc/init.d/mysql
3.2Modification of mysql services
Vi / etc/init.d/mysql
3.3Modification of profile my.cnf
Vi / etc/my.cnf
Copy the contents as follows, and adjust the parameters as needed
[client] port = 33066default-character-set=utf8 [mysqld] # General configuration options basedir = / usr/local/mysql-5.7.29datadir = / usr/local/mysql-5.7.29/dataport = 33066character-set-server=utf8default_storage_engine = InnoDBsql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZEO, NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
3.4 initialize mysql
/ usr/local/mysql-5.7.29/bin/mysqld
-- initialize--user=mysql
-- basedir=/usr/local/mysql-5.7.29
-- datadir=/usr/local/mysql-5.7.29/data
The success is as follows, pay attention to the password
3.5 start the service
Service mysql start
4. Login and remote setup 4.1 Login to mysql
. / mysql-u root p remember the registration password
4.2 modify root login password
Set password=password ('new password')
4.3 enable remote access
GRANT ALL PRIVILEGES ON *. * TO 'root'@'%' IDENTIFIED BY' password'; flush privileges
5. Environment variables and boot configuration
5.1 setting environment variables
Vi / etc/profile
Add the following
# mysql environment export MYSQL_HOME=/usr/local/mysqlexport PATH=$PATH:$MYSQL_HOME/bin
Source / etc/profile updates system variabl
5.2 Boot start
Chkconfig-add mysql mysql service to bootstrap service
Chkconfig mysql on setting self-booting
Chkconfig-- list view service list
After reading the above content, do you have a further understanding of how to build mysql5.7.29 in centos7 in linux? if you want to learn more, 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.