Install MySQL under Ubuntu and use

Source: Internet
Author: User

First, in the Ubuntu terminal input

sudo apt-get install Mysql-server

Second, in the installation to set the root password, you can input, but must remember.

Third, after installation can use command detection is successful installation

sudo netstat-tap|grep MySQL

Iv. log in with root MySQL input

sudo mysql-u root-p

Explain:

-U: Specify that you want to use that database user login, only install the root password when we only know that there is root user, so use root

-P: Specify password, do not enter the password directly after-p, invalid, command input regret automatically let you enter the password

V. Users viewing the database

Use user;

Update user Set host = '% ' where user = ' root ';

Select Host,user from user;

Explanation: means to go to the user database to view, change the host to% because if you do not modify the default to local host, other IP logins will report an error that does not allow access.

Vi. Change Configuration Let Telnet

sudo vim/etc/mysql/my.cnf

Use the # symbol to comment out bind_address = 127.0.0.1

Seven, restart the MySQL service, because the configuration changed

Sudo/etc/init.d/mysql restart

Eight, log on to other computers, I use NAVICAT login on Windows

Install MySQL under Ubuntu and use

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.