Installation and configuration of MySQL under Ubuntu

Source: Internet
Author: User
Tags administrator password

1) First check if MySQL is installed in the system

Enter sudo netstat-tap inside the terminal | grep MySQL

If not reflected, the installed results are not displayed and are not installed. If shown below, you have installed

650) this.width=650; "alt=" \ "src=" Http:// "style=" border-width:0px;padding:0px;margin:0px;list-style:none;width:630px;height:60.543175487465184px; "/>

2) If it is not installed, install MySQL.

In terminal input sudo apt-get install mysql-server mysql-client

The results of the operation are as follows:

650) this.width=650; "alt=" \ "src=" Http:// "style=" border-width:0px;padding:0px;margin:0px;list-style:none;width:630px;height:267.6413793103448px; "/>

During this installation, you will be asked to enter the password for the root user (managing MySQL database user, non-linux system user), as required. As shown below:

650) this.width=650; "alt=" \ "src=" Http:// "style=" border-width:0px;padding:0px;margin:0px;list-style:none;width:630px;height:403.68932038834953px; "/>

3) test whether the installation was successful:

In terminal input sudo netstat-tap | grep MySQL

The installation succeeds if the following result is present:

650) this.width=650; "alt=" \ "src=" Http:// "style=" border-width:0px;padding:0px;margin:0px;list-style:none;width:630px;height:60.543175487465184px; "/>

4) You can also log in to MySQL test

In the terminal input Mysql-uroot-p next will prompt you to enter the password, enter the correct password, you can enter. As shown below:

650) this.width=650; "alt=" \ "src=" Http:// "style=" border-width:0px;padding:0px;margin:0px;list-style:none;width:630px;height:231.875px; "/>

5) Some simple management of MySQL:

Start MySQL service: sudo start MySQL

Stop MySQL service: sudo stop MySQL

Modify the administrator password for MySQL: sudo mysqladmin-u root password newpassword

Set up remote access (normally, the 3306 port that MySQL occupies is only listening on IP, denying access to other IPs (Netstat can see it). Cancel the local supervisor

Listen to the need to modify the My.cnf file:):

sudo vi/etc/mysql/my.cnf

Bind-address = this content and comment

6) MySQL post-installation directory structure analysis (this structure is only for the use of Apt-get install online installation):

Database storage directory:/var/lib/mysql/

Related configuration file directory:/usr/share/mysql

Related Command Storage directory:/usr/bin (mysqladmin mysqldump, etc.)

Startup footstep Storage directory:/etc/rc.d/init.d/

7) MySQL graphical management software

Generally used there are two better, an open source, a commercial charge:

Open Source: MySQL Workbench (Specific usage introduction as I use, I will slowly summarize)

Business: Navicat (chargeable, 30 days experience, then I believe that everyone will have a way)

At this point, Ubuntu under the MYQL installation and configuration is complete.

Thank you!

This article is from "peter-unscrupulousness Youth" blog, please be sure to keep this source

Installation and configuration of MySQL under Ubuntu

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: 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.