(Original) uninstall and install mysql5.6 in centos Linux

Source: Internet
Author: User
Tags mysql command line

1. uninstall MySQL:
1. Check whether MySQL is installed before.
# Rpm-Qa | grep-I MySQL
2. uninstall MySQL
# Yum remove MySQL
3. Delete related packages
# Yum remove package name

Ii. Install MYSQL:
Http://dev.mysql.com/downloads/mysql/
Install the MySQL server:
Rpm IVH MySQL-server-5.6.11-2.el6.i686.rpm
Install the mysql client:
Rpm IVH MySQL-client-5.6.11-2.el6.i686.rpm

1. Installation
# Rpm-IVH MySQL-server-5.6.11-2.el6.i686.rpm
# Rpm-IVH MySQL-client-5.6.11-2.el6.i686.rpm
2. Check whether the MySQL service is enabled:
# Netstat-Nat

if it is enabled, a port number is 3306. If it is not enabled, use Service MySQL start to start MySQL service
3. logon and troubleshooting
# mysql-uroot-P
enter password:
error 1045 (28000): Access denied for user 'root' @ 'localhost' (using password: No) solution to this error
# service MySQL stop
# mysqld_safe -- user = MySQL -- skip-grant-tables -- skip-Networking &
# mysql-u root MySQL
mysql> Update user SET Password = PASSWORD ('root ') where user = 'root';
mysql> flush privileges;
mysql> quit
# service MySQL start
to add a MySQL account with original access (enter the MySQL Command Line ):
grant all privileges on *. * To test @ "%" identified by "123456" with grant option;
If the mysql5.6 operation reports an error: You must set password before executing this statement solution, execute the following statement
mysql> SET Password = PASSWORD ('root');

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.