Ubuntu12.04 uninstall and install MySQL

Source: Internet
Author: User
Ubuntu12.04 uninstall MySQL 1sudoapt-getautoremove -- purgemysql-server-5.02sudoapt-getremovemysql-server3sud

Ubuntu 12.04 uninstall MySQL Step 1 sudo apt-get autoremove -- purge mysql-server-5.0 2 sudo apt-get remove mysql-server 3 sud

Homepage → Database Technology

Background:

Read News

Uninstall and install MySQL on Ubuntu 12.04

[Date: 2012-06-01] Source: Linux community Author: Linux [Font:]

Uninstall MySQL in Ubuntu 12.04

Step 1

1 sudo apt-get autoremove -- purge mysql-server-5.0

2 sudo apt-get remove mysql-server

3 sudo apt-get autoremove mysql-server

4 sudo apt-get remove mysql-common (very important)

Step 2: Clear residual data

1 dpkg-l | grep ^ rc | awk '{print $2}' | sudo xargs dpkg-P

Step 3: Install MySQL

1 sudo apt-get install mysql-server

2 sudo apt-get install mysql-client

3 sudo apt-get install php5-mysql (installation php5-mysql is to connect php and mysql)

Once the installation is complete, the MySQL server should be started automatically. You can run the following command at a terminal prompt to check whether the MySQL server is running:

Sudo netstat-tap | grep mysql

When you run this command, you can see a line similar to the following:

Tcp 0 0 localhost. localdomain: mysql *: * LISTEN-

If the server cannot run properly, run the following command to start it:

Sudo/etc/init. d/mysql restart

Step 4: configure the Administrator Password

Go to mysql

$ Mysql-uroot-p administrator password

Configure the MySQL administrator password:

Sudo mysqladmin-u root password newpassword

For more information about Ubuntu, see the Ubuntu special page? Tid = 2

  • 0
  • Compiling and installing MySQL 5.5 on Linux [RHEL5.4]

    Oracle multi-table insert operations

    Related information: MySQL installation Tutorial: Ubuntu tutorial

    Image Information

    View All comments in this article (0)

    Comments

    Latest Information

    Popular this week

    Introduction to Linux community-advertisement service-website map-help Info-contact us
    The articles published on this site (LinuxIDC) do not mean that they agree with the statement or description. They only provide more information and do not constitute any suggestions.


    Copyright©2006-2014 Linux community All rights reserved Zhejiang ICP backup No. 06018118

    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.