First section MySQL Installation

Source: Internet
Author: User
Tags mysql in

1 Pre-installation checks

To check if MySQL is already installed on your Linux system, enter the command to try to open the MySQL service:

When you enter a password, the following prompt indicates that MySQL is already installed in the system:

If this is the case, then there is no MySQL in the system and you need to continue with the installation:

2. Ubuntu Linux Installation Configuration MySQL

The simplest way to install MySQL on Ubuntu is to install it online. Just a few lines of simple commands

During installation, you will be prompted to confirm the input yes, set the root user password (which can then be modified), etc., and wait a few moments for the installation to succeed.

After the installation is complete, use the command to verify that it is installed and started successfully:

At this point, you can modify the MySQL configuration file (my.cnf) with gedit according to your own needs, using the following command:

At this point, MySQL has been installed, configured to complete, can be used normally.

3 Try MySQL

1). Open MySQL

Use the following two commands to open the MySQL service and log in with the root user:

The following prompt will appear for successful execution:

2). View the database

Use show databases; the commands to see which databases are available (be careful not to omit the semicolon ; ):

3). Connect to the database

Choose to connect one of the databases, the statement format is use <数据库名> , here can not add a semicolon, here we select the information_schema database:

4). View Table

Use the commands to show tables; see which tables are in the database (be careful not to miss out ";") ):

5). Exit

Use the command quit or exit quit MySQL.

First section MySQL Installation

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.