In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to install MySQL5.6 with RPM". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to install MySQL5.6 with RPM".
1. Check MySQL and related RPM packages
Check MySQL and related RPM packages for installation, and if any, remove (rpm-e name)
[plain] view plain copy
[root@localhost ~] # rpm-qa | grep-I mysql
Mysql-libs-5.1.66-2.el6_3.x86_64
[root@localhost ~] # yum-y remove mysql-libs*
two。 Download the rpm package
Download the RPM package for Linux, such as the RPM package for CentOS6.4_64, as follows: [plain] view plain copy
[root@localhost rpm] # ll
Total 74364
-rw-r--r--. 1 root root 18442536 Dec 11 20:19 MySQL-client-5.6.15-1.el6.x86_64.rpm
-rw-r--r--. 1 root root 3340660 Dec 11 20:06 MySQL-devel-5.6.15-1.el6.x86_64.rpm
-rw-r--r--. 1 root root 54360600 Dec 11 20:03 MySQL-server-5.6.15-1.el6.x86_64.rpm
3. Install MySQL
[plain] view plain copy
[root@localhost rpm] # rpm-ivh MySQL-server-5.6.15-1.el6.x86_64.rpm
[root@localhost rpm] # rpm-ivh MySQL-devel-5.6.15-1.el6.x86_64.rpm
[root@localhost rpm] # rpm-ivh MySQL-client-5.6.15-1.el6.x86_64.rpm
# modify configuration file location
[root@localhost rpm] # cp / usr/share/mysql/my-default.cnf / etc/my.cnf
4. Initialize MySQL and set password
[plain] view plain copy
[root@localhost rpm] # / usr/bin/mysql_install_db
[root@localhost rpm] # service mysql start
[root@localhost rpm] # cat / root/.mysql_secret # View root account password
# The random password set for the root user at Wed Dec 11 23:32:50 2013 (local time): qKTaFZnl
[root@localhost] # mysql-uroot-pqKTaFZnl
Mysql > SET PASSWORD = PASSWORD ('123456'); # set the password to 123456
Mysql > exit
[root@localhost] # mysql-uroot-p123456
5. Allow remote login
[plain] view plain copy
Mysql > use mysql
Mysql > select host,user,password from user
+-+
| | host | user | password | |
+-+
| | localhost | root | * 6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
| | localhost.localdomain | root | * 1237E2CE819C427B0D8174456DD83C47480D37E8 |
| | 127.0.0.1 | root | * 1237E2CE819C427B0D8174456DD83C47480D37E8 |
| |:: 1 | root | * 1237E2CE819C427B0D8174456DD83C47480D37E8 |
+-+
Mysql > update user set password=password ('123456') where user='root'
Mysql > update user set host='%' where user='root' and host='localhost'
Mysql > flush privileges
Mysql > exit
6. Set Boot self-boot
[plain] view plain copy
[root@localhost ~] # chkconfig mysql on
[root@localhost ~] # chkconfig-- list | grep mysql
Mysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off
7. Default installation location of MySQL
[plain] view plain copy
/ var/lib/mysql/ # database directory
/ usr/share/mysql # configuration file directory
/ usr/bin # related command directory
/ etc/init.d/mysql # startup script
8. Modify character set and data storage path
Configure / etc/my.cnf file, modify the data storage path, mysql.sock path and default encoding utf-8.
[plain] view plain copy
[client]
Password = 123456
Port = 3306
Default-character-set=utf8
[mysqld]
Port = 3306
Character_set_server=utf8
Character_set_client=utf8
Collation-server=utf8_general_ci
# (note that mysql is default after installation in linux: table names are case-sensitive, column names are not case-sensitive; 0: case-sensitive, 1: case-insensitive)
Lower_case_table_names=1
# (set the maximum number of connections. By default, the maximum number of connections allowed by 151 MySQL server is 16384;)
Max_connections=1000
[mysql]
Default-character-set = utf8
Thank you for your reading, the above is the content of "how to install MySQL5.6 in RPM". After the study of this article, I believe you have a deeper understanding of how to install MySQL5.6 in RPM, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.