Linux installation MySQL and MySQL remote access configuration

Source: Internet
Author: User

First, check whether the system has its own MySQL database

Rpm-qa | grep mysql//This command will check if the MySQL database is already installed on the operating system

Second, the existing database to uninstall

RPM-E MySQL//normal Delete mode

RPM-E--nodeps MySQL//brute force Delete mode, if you use the above command to delete, prompted to have other dependent files, then use this command can be strongly deleted

Third, the installation of MySQL with the yum command

Yum List | grep MySQL//view version information for downloaded MySQL on Yum

Yum install-y mysql-server mysql mysql-deve//Database installation

Rpm-qi Mysql-server//View version information for a database

Service Mysald start//Start database

Chkconfig--list | grep mysqld//Check to see if the database is booting

Chkconfig mysqld on//Set database on boot

mysqladmin-u root password ' password '//set root user password to password

Mysql-u root-p//Login database, enter password

Iv. Database Remote Access configuration

Log in to the database first

Mysql-u root-p//Login database, enter password

use MySQL;//select MySQL Database

Update user set host= '% ' where user= ' root '; If error 1062 (23000): Duplicate entry '%-root ' for key ' PRIMARY ' disregarded

Flush privileges; Save changes

Linux installation MySQL and MySQL remote access configuration

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.