CentOs5.5 uninstalling and installing MYSQL and troubleshooting _ MySQL

Source: Internet
Author: User
How to uninstall and install MYSQL in CentOs5.5 and how to uninstall CentOSmysql

BitsCN.com
When operating the mysql database under CentOs, a series of problems are encountered: Java code 1. ERROR 1044 (42000) during local connection: Access denied for user ''@ 'localhost' to database 'mysql' 2. remote connection 1130-host... is not allowed to connect to this MySql server 3. after the root password is changed, the system prompts ERROR 1044 (42000): Access denied for user 'root' @ 'localhost' when logging on '..... my solution is as follows: Java code 1. service mysqld stop # stop mysql service 2. yum remove mysql # Uninstall mysql 3. cd/var/lib # Here is the mysql folder, which contains the database file Parts 4. mkdir mysqlbac 5. mv mysql mysqlbac # back up the files that have not been uninstalled. just in case, this step must be done. Otherwise, there are still issues after the following operations are completed. yum install mysql-server # reinstall mysql 7. service mysqld start # start mysql service 8. mysql-uroot mysql # enter mysql database as root 9. update user set password = password ('000000') where user = 'root' # set the root password to 123456 10. flush privileges 11. after exit passes the above 11 steps, all the above problems have been solved. Author: mcj8089bitsCN.com

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.