Installation of MySQL database under CentOS

Source: Internet
Author: User

Seniors always say, to learn while recording, to summarize. So, start to record 1.1 points of what you've learned every day.

Complex theory does not understand, will only be installed, well after the start to play!

1. Download the corresponding RPM installation package on the website

: Http://dev.mysql.com/downloads/mysql/5.6.html#downloads

For example: I only downloaded these three.

2, I am using rpm command installation (relatively familiar)

Actually, this is supposed to be the 3rd step.

#rpm-IVH mysql-client-5.6. 1-ivh mysql-devel-5.6. 1-ivh mysql-server-5.6. 1. el6.i686.rpm

Post-installation input (restart database): Service MySQL Restart

Error: MySQL Unrecognized service

Check the reason, is the previous MySQL did not delete the sake ~ ~ so delete it!

3, delete the original MySQL

Find out what Rpm-qa|grep MySQL first

Remove the above three one by one:

Remove and then go back to step 2 and reinstall.

4, fix the root password (this root account is the root account of MySQL, not the root account of Linux).

Change Password input: #mysqladmin-u root password ' root ' 
And then it goes Wrong (┬_┬)
Error: ' Access denied for user ' root ' @ ' localhost '

Then Baidu again, use the following method can solve the problem:

--user=mysql--skip-grant-tables--skip-networking &-u root mysqlmysql> UPDATE user SET Password=password ('newpassword (set new password)'where user='root ' ; MySQL> FLUSH privileges;mysql>/etc/init.d/-uroot-  < Enter a new password >

5, test the installation is successful:

Enter:mysql> show databases;

The semicolon must be added, otherwise an error will be displayed.

But even after I added a semicolon, it went wrong (t^t)

ERROR 1820 (HY00): Must SET PASSWORD before executing this statement

I once again witnessed the strong Baidu

Enter:mysql> SET PASSWORD = PASSWORD (' 123456 (your password) ');

Reset Password once!

Then, it seems to be true ~ ~

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.