In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to install MySQL in RedHat6.5. I hope you will learn a lot after reading this article. Let's discuss it together.
Installation environment:
RedHat6.5
Installation steps:
Step 1: download
Download MySQL5.7: http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.12-1.el6.x86_64.rpm-bundle.tar
Step 2: install
Check the server to see if MySQL is installed before installation, and uninstall it if so:
[root@worker1 tmp] # rpm-qa | grep mysqlmysql-libs-5.1.71-1.el6.x86_64 [root@worker1 tmp] # rpm-e-nodeps mysql-libs-5.1.71-1.el6.x86_64 / / Uninstall
Extract the downloaded file:
[root@worker1 tmp] # tar-xf mysql-5.7.12-1.el6.x86_64.rpm-bundle.tar
Install sequentially:
Rpm-ivh mysql-community-common-5.7.12-1.el6.x86_64.rpmrpm-ivh mysql-community-libs-5.7.12-1.el6.x86_64.rpmrpm-ivh mysql-community-devel-5.7.12-1.el6.x86_64.rpmrpm-ivh mysql-community-client-5.7.12-1.el6.x86_64.rpmrpm-ivh mysql-community-server-5.7.12-1.el6.x86_64.rpm
Not surprisingly, MySQL should have been successfully installed.
Step 3: setting environment variables
1. Start MySQL:service mysqld start
2. Log in: mysql-u root-p. The initial login password is empty, and enter directly:
The reason for this error is that there is no Password field in the mysql.user table in MySQL5.7, so log in securely, and then change the password.
The solution is as follows:
Modify the MySQL configuration file: vim / etc/my.cnf, add: skip-grant-tables at the end of the file, restart the MySQL service: service mysqld restart after saving, and log in again.
3. Change the password. The user's password is under the database named mysql:
Execute the following instructions in turn:
Mysql > use mysqlmysql > update user set password_expired='N' where user='root';mysql > update user set authentication_string=password ('123456') where user='root';mysql > flush privileges
Note: be sure to remove the skip password detection content added before the my.cnf configuration file, and restart the service
Other:
1. Encoding setting: vim / etc/my.cnf, and default-character-set=utf8 is added at the end of the file.
2. Allow remote access to MySQL: give any host the right to access data
Mysql > grant all privileges on. To 'root'@'%'with grant option
Will report error: ERROR 1133 (42000): Can't find any matching row in the user table
In fact, it would be normal to have root users in the mysql.user table in advance, or to add an identified by 'password' at the end of this sentence. Such as the following command line
Mysql > grant all privileges on. To 'root'@'%'identified by' 123456 'with grant option
3. Change password policy:
Mysql > set global validate_password_length=0;-change password length mysql > set global validate_password_policy=0;-change password policy to LOW after reading this article, I believe you have a certain understanding of RedHat6.5 installation of MySQL, want to know more related knowledge, welcome to follow the industry information channel, thank you for reading!
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.