In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the relevant knowledge of "the steps of installing mysql5.7tar.gz in centos". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
1. Tar-zxvf mysql-5.7.27-linux-glibc2.12-x86_64.tar.gz
two。 Enter the / usr/local directory through the command cd / usr/local
3. Create a soft link for the mysql installation directory
Ln-s mysql-5.7.27-linux-glibc2.12-x86_64 mysql
4. Add mysql user groups and mysql users for centos (the-s / bin/false parameter specifies that the mysql user has only ownership and no login rights)
4.1 groupadd mysql
4.2 useradd-r-g mysql-s / bin/false mysql
Cd / usr/local/mysql
Chown-R mysql:mysql. /
. / bin/mysqld-- user=mysql-- basedir=/usr/local/mysql-- datadir=/usr/local/mysql/data-- initialize (this part will show the mysql default password)
. / support-files/mysql.server start enables the mysql service (this one will report an error and rewrite the configuration file)
The following is the content of the my.cnf configuration file
[mysqld] lower_case_table_names=1sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER NO_ENGINE_SUBSTITUTIONport=3306datadir=/usr/local/mysql/datasocket=/usr/local/mysql/mysql.sockslow_query_log=ONslow_query_log_file=/var/lib/mysql/slow_query_logs.loglong_query_time=1user=mysqlmax_connections=151# Disabling symbolic-links is recommended to prevent assorted security riskssymbolic-links=0skip-name-resolve# setting ignores case lower_case_table_names = specify encoding character-set-server=utf8 collation-server=utf8_general_ci # enable ip binding bind-address = 0. 0.0.0 [mysqld_safe] log-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pid # specifies the socket communication file path [client] socket=/usr/local/mysql/mysql.sock default-character-set=utf8# query cache configuration when the client connects to mysql # query_cache_type = 1#query_cache_size = 600000
Cp support-files/mysql.server / etc/init.d/mysqld (put the mysql process into the system process)
Service mysqld restart (restart the mysql service)
Configure mysql environment variables
Save vi / etc/profileexport PATH=$PATH:/usr/local/mysql/bin# and exit source / etc/profile
Then enter mysql-u root-p
# reset the password alter user 'root'@'localhost' identified by' 123456 password. # Select database first: use mysqlupdate user set user.Host='%' where user.User='root';select user,host from user;flush privileges; "steps for centos to install mysql5.7tar.gz" ends here. Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.