Re-install MySQL

Source: Internet
Author: User

Reload the MySQL method.

Transfer from http://blog.sina.com.cn/s/blog_73000beb01012eh4.html

1. Delete MySQL

1.1sudo apt-Get Autoremove--Purge MySQL-Server-5.0
1.2 sudo apt- get remove mysql- server
1.3 -get autoremove mysql-server
1.4  sudo apt-get  remove mysql-common (very important)

In fact, some of the above is redundant, it is recommended to follow the order
Clean up residual data

Dpkg -l | grep ^RC| awk '{print $}' | sudo xargs dpkg -P

2. Install MySQL

2.1sudo apt-get install MySQL-server
2.2 sudo apt-get install MySQL-client
2.3 sudo apt-get install php5-mysql(install php5-mysql to connect PHP with MySQL )
2.4 Apt-get Install Libmysqlclient-dev

The fourth part is necessary, otherwise it will prompt mysql\mysql.h to find the problem


Once the installation is complete, the MySQL server should start automatically. You can check whether the MySQL server is running by running the following command at the terminal prompt:

sudo netstat -tap | grep mysql

If the server does not function correctly, you can start it by using the following command:

/etc/init.d/mysql restart

3. Enter MySQL

There's no need to say that.

Re-install MySQL

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.