Install Mysql in the Liunx environment and mysql in the liunx Environment

Source: Internet
Author: User

Install Mysql in the Liunx environment and mysql in the liunx Environment
1.1View the installation path of mysql:

[Root @ bogon ~] # Whereis mysql

Mysql:/usr/bin/mysql/usr/lib/mysql/usr/share/man/man1/mysql.1.gz

 

1.2 View the mysql installation package:

[Root @ bogon ~] # Rpm-qa | grep mysql

Mysql-community-client-5.6.26-2.el6.i686

Mysql-community-release-el6-5.noarch

Mysql-community-common-5.6.26-2.el6.i686

Mysql-community-libs-5.6.26-2.el6.i686

Mysql-community-server-5.6.26-2.el6.i686

 

1.3 Uninstall mysql

[Root @ bogon ~] # Yum remove mysql

 

Delete mysql database files:

Delete the/var/llib/mysql directory

 

1.4 Install mysql

Step 1: Download the mysql yum source package for linux from the official oracle website.

 

Step 2: Upload the yum source package to linux for installation.

[Root @ bogon ~] # Yum localinstall mysql-community-release-el6-5.noarch.rpm

[Root @ bogon ~] # Yum install mysql-server

 

Step 3: Start mysql

[Root @ bogon ~] # Service mysqld start

 

Step 4: Set the password for the root user

[Root @ bogon ~] #/Usr/bin/mysqladmin-u root password 'root'

 

Step 5: remote connection authorization

Grant all privileges on *. * TO 'myuser' @ '%' identified by 'mypassword' with grant option;

 

Note: replace 'myuser' and 'mypassword' with the actual user name and password.

 

Mysql> grant all privileges on *. * TO 'root' @ '%' identified by 'root' with grant option;

 

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.