Install and remove MySQL and simple MySQL operations on Ubuntu by Apt-get Way

Source: Internet
Author: User
Tags mysql version

The installation process:

First step: Open a terminal.

Step two: Enter the sudo apt-get install mysql-server and press ENTER to enter the password.

Step three: Terminal prompt "Do you want to continue?" [y/n] ". Enter Y and press ENTER

Fourth step: The software will automatically install and jump out of the following interface, require you to enter the root password of the MySQL, you can set a password, and then enter.

Fifth step: You will be prompted to confirm the password you just entered. Repeat the password again, and press ENTER.

Sixth step: If the following interface shows that MySQL has been installed successfully. You can also see that the MySQL version we installed is 5.5.

The seventh step: actually to the above step installation work has basically been done. Let's check to see if the MySQL database has been started. Enter Ps-ef|grep mysqld inside the terminal

You can see that the MySQL process number is 31115 (your computer may show a different process number than me).

Eighth step: Next visit MySQL database. In terminal input Mysql-u root-p, press ENTER. You are prompted for a password.

has entered the management interface of MySQL.

Nineth step: Enter show databases at the terminal;

Show all databases under current MySQL

Tenth step: Enter the use MySQL at the terminal;

Go to MySQL Database

12th step: Enter show tables at the terminal;

Show all tables under the current database

13th step: Exit the MySQL operating interface, enter quit on the terminal and press ENTER.

Process of uninstallation:

First step: Enter the following command in the terminal, sudo apt-get autoremove--purge mysql-server and press ENTER.

Step two: The process of uninstalling will prompt "Do you want to continue [y/n]?" "Enter Y, and press ENTER."

This will allow you to uninstall MySQL.

Install and remove MySQL and simple MySQL operations on Ubuntu by Apt-get Way

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.