In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you how to install MySQL5.6 RPM, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
I. document preparation
1. MySQL-server-community-6.0.11-0.rhel5.i386.rpm
2. MySQL-client-community-6.0.11-0.rhel5.i386.rpm
II. Installation
1 # rpm-ivh MySQL-server-community-6.0.11-0.rhel5.i386.rpm
2 # rpm-ivh MySQL-client-community-6.0.11-0.rhel5.i386.rpm
III. Start and stop MySQL
1 # service mysql start
2 # service mysql stop
3 # service mysql restart
4. Set the MySQL user password
Mysql:mysql users are automatically created after installation, and you need to set your own password.
1 # passwd mysql
2 / / enter the password you need
Change the root password
After the installation is complete, the default root password is empty. You can set the root password yourself.
1 # su-l mysql
2$ mysqladmin-u root password '123456'
VI. Visit
1. Command line
1$ mysql-u root-p
2. Remote access
Some permissions need to be set for remote access as follows:
1), change the table method. It may be that your account is not allowed to log in remotely, only in localhost. At this time, as long as on the computer in localhost, after logging in to mysql, change the "host" entry in the "user" table in the "mysql" database from "localhost" to "%"
1$ mysql-u root-ppassword
2 mysql > use mysql
3 mysql > update user set host ='% 'where user =' root'
4 mysql > select host, user from user
2) Authorization law. For example, if you want myuser to connect to the mysql server from any host using mypassword.
1 GRANT ALL PRIVILEGES ON *. * TO 'myuser' @'% 'IDENTIFIED BY' mypassword' WITH GRANT OPTION
If you want to allow the user myuser to connect to the mysql server from the host with ip 192.168.1.6, and use mypassword as the password
1 GRANT ALL PRIVILEGES ON *. * TO 'myuser' @' 192.168.1.3 'IDENTIFIED BY' mypassword' WITH GRANT OPTION
The first method I used, at first, I found that it didn't work. I looked it up on the Internet and executed one less sentence.
1 mysql > FLUSH PRIVILEGES
Just make the changes effective, and that's fine.
3) run on the machine where mysql is installed:
1$ mysql-h localhost-u root
2 / / this should allow access to the MySQL server
3 mysql > GRANT ALL PRIVILEGES ON *. * TO 'root' @'% 'WITH GRANT OPTION
4 / / Grant any host permission to access data
5 mysql > FLUSH PRIVILEGES
6 / / the modification takes effect
7 mysql > EXIT
8 / / exit the MySQL server
This allows you to log in as root on any other host.
3. Use Navicat for MySQL to access if prompted: Can't get hostname for your address, the following settings are required in addition to the authorization in 2:
Edit / etc/my.cnf, and add a line in: [mysqld]:
1 skip-name-resolve
MySQL ignores database table name case
Modify / etc/my.cnf and add a line in [mysqld]:
1 lower_case_table_names= 1
If you do not have a / etc/my.cnf file, find the my-*.cnf file in the / usr/share/mysql directory according to your needs and copy it to / etc/my.cnf
1$ cp / usr/share/mysql/my-medium.cnf / etc/my.cnf
The above is all the contents of the article "how to install RPM in MySQL5.6". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, 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.