In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to use rpm to install MySQL. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
How to install MySQL using rpm: first download the rpm package and start installing the server side, then install [mysql-client] with the code [rpm-ivh MySQL-client-5.6.20-1.el6.i686.rpm].
How to install MySQL using rpm:
1. First you need to download the rpm package:
You can choose to download according to different versions. What I download is:
MySQL-server-5.6.20-1.el6.i686.rpm
MySQL-client-5.6.20-1.el6.i686.rpm
MySQL-devel-5.6.20-1.el6.i686.rpm (backup of this package)
Because if you install mysql in rpm mode, you will not be able to connect mysql in command line mode only if you install mysql-server, so you need to install mysql-client
2. Start installing the server:
Execute the command:
Rpm-ivh MySQL-server-5.6.20-1.el6.i686.rpm
After the installation is complete, you will be prompted:
Tip 1: after installing mysql-server, the password of a root account will be randomly generated and saved in: / root/.mysql_secret.
Tip 2: you need to change the default password when you connect to mysql for the first time after installing mysql-server
After determining this, you need to execute the command: find /-name mysql to find the installation location of mysql-server, as follows:
/ etc/logrotate.d/mysql
/ etc/rc.d/init.d/mysql-startup file
/ usr/share/mysql-contains the my-default.cnf file
/ usr/bin/mysql
/ usr/lib/mysql
/ var/lib/mysql-the directory where the database files are stored
Then execute: find /-name my.cnf
Find the location of the configuration file for mysql-server, as follows:
/ usr/my.cnf
Then start mysql-server and execute:
/ etc/init.d/mysql start
Prompt to execute after successful startup:
Ps-el | grep mysql
The system will list the relevant process information of mysqld, indicating that mysql-server is installed successfully!
3. Install mysql-client:
Since there is no way to connect to the database on the command line after installing mysql-server, you need to continue to install mysql-client and execute the command:
Rpm-ivh MySQL-client-5.6.20-1.el6.i686.rpm
After a while, the system will prompt that the installation is successful, and at this time, execute:
Mysql-u root-p to connect to the mysql, you need to enter the password, the password is the random password generated before, enter can be successful!
After entering the mysql console, execute:
Show databases
Found that the system prompted to change the password first, so: first exit the system, and then execute: mysqladmin-u root-p password 'new-passwd'
To change the password, then connect to mysql again, enter the password you just set, and then continue to execute the show databases; command and find it successful!
4. So the next question is, do you still need to install the mysql-devel package?
Give it a try.
Execute:
Rpm-ivh MySQL-devel-5.6.20-1.el6.i686.rpm
Prompt installation is successful, then connect to mysql, execute show databases; is still OK.
On how to use rpm to install MySQL to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.