Ubuntu completely remove MySQL reload MySQL

Source: Internet
Author: User
Tags mysql connect administrator password

1. Delete  mysql        sudo apt-get autoremove--purge mysql-server-5.0        Sud o apt-get Remove mysql-server        sudo apt-get autoremove mysql-server        s Udo Apt-get Remove Mysql-common//This is important 2, clean up residue data         dpkg-l |grep ^rc|awk ' {print $} ' |sudo Xargs DPKG-P3, install mysql        sudo apt-get install mysql-server        sudo apt-get ins Tall mysql-client        sudo apt-get install php5-mysql//install Php5-mysql connect PHP with MySQL 4, once the installation is complete, MYSQ L the server should start automatically. You can run the following command at the terminal prompt to check if the MySQL server is running:        sudo netstat-tap | grep mysql5, when you run the command, you can see a line similar to the following:        TCP 0 0 localhost.localdomain:mysql *:* LISTEN-6 If the server is not operating properly Yes, you can start it with the following command:        sudo/etc/init.d/mysql restart7, enter mysql        $mysql-uro Ot-p Administrator Password 8, configure MySQL Administrator password:      &NBSp sudo mysqladmin-u root password newpassword

Ubuntu completely remove MySQL reload MySQL

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.