Install MySQL under Linux (offline installation and online installation)

Source: Internet
Author: User
Tags flush

One: Install MySQL online

1, first detect, MySQL has not been installed before

Command: RPM-QA | grep MySQL

2. Delete mysql command: rpm-e--nodeps ' Rpm-qa | grep MySQL '

3. Install MySQL command online: yum-y install Mysql-server

4. Turn on the MySQL services: Service mysqld start

5. Load the MySQL service to boot entry: Chkconfig mysqld on

6, initialize the configuration of MySQL service
Where is mysql_secure_installation
Execute Script/usr/bin/mysql_secure_installation

7. Access to MySQL service
Mysql-h Master.hive.crxy.cn-uroot-proot
Problem: Host ' 192.168.1.102 ' isn't allowed to connect to this MySQL server
Workaround:
Mysql> Grant all privileges on * * to ' root ' @ '% ' identified by ' root ';(This sentence means: Give all permissions to the root user on any database and all tables on any host)
mysql> flush Privileges;

Second: Install MySQL offline

1°, view MySQL dependencies
Rpm-qa | grep MySQL
2°, delete MySQL dependency
Rpm-e--nodeps ' Rpm-qa | grep MySQL ' or
Rpm-e--nodeps ' Rpm-qa | grep MySQL '
3°, offline install MySQL
RPM-IVH mysql-server-5.1.73-1.glibc23.x86_64.rpm
RPM-IVH mysql-client-5.1.73-1.glibc23.x86_64.rpm
4°, start MySQL service
Service MySQL Start
5°, join to boot startup item
Chkconfig MySQL on
6°, initialize configuration MySQL service
Whereis mysql_secure_installation
Execute Script/usr/bin/mysql_secure_installation
7°, Access MySQL service
Mysql-h Master.hive.crxy.cn-uroot-proot
Problem: Host ' 192.168.1.102 ' isn't allowed to connect to this MySQL server
Workaround:
Mysql> Grant all privileges on * * to ' root ' @ '% ' identified by ' root ';
mysql> flush Privileges;

Install MySQL under Linux (offline installation and online installation)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.