Remote access to Ubuntu under MySQL problem

Source: Internet
Author: User

Tag: operation without span cal BSP title default DDR status

The problem of MySQL cannot be remotely accessed with IP address under Ubuntu

Method 1:

1.mysql>grant all privileges on * * to ' root ' @ '% ' identified by ' root ';

  

(%) Represents all IP

The 1th root indicates an account

The 2nd root indicates a password

2.mysql>flush privileges;

3. Stop and restart the MySQL service.

Stop command:

Service MySQL Stop

Start command:

Service MySQL Start

View Status:

Service MySQL Status

If the above operation is still inaccessible, then MySQL should not allow remote access.

To modify a configuration file:

sudo vim/etc/mysql/mysql.conf.d/mysqld.cnf

Comment out bind-address = 127.0.0.1 (that is, add # at the beginning of the line), as follows:

The code is as follows:
# Instead of skip-networking The default is now-listen only on # localhost which are more compatible and are not less secure. # bind-address          = 127.0.0.1

You can then restart the service to access it.

Remote access to Ubuntu under MySQL problem

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.