How to configure Internet access for mysql in ubuntu

Source: Internet
Author: User
1. use apt-getmysql-servermysql-client to install mysql and correctly configure the mysql User Password. you can access it locally through phpmyadmin, but it cannot be accessed within the LAN, the modified mysql configuration file is as follows: there are only a few lines of mysql real configuration files under ubuntu in...

1. use apt-get mysql-server mysql-client to install mysql and correctly configure the mysql User Password. you can access it locally through phpmyadmin, but it cannot be accessed within the LAN, the modified mysql configuration file contains the following lines:

Where is the real configuration file of mysql in ubuntu?

Reply content:

1. use apt-get mysql-server mysql-client to install mysql and correctly configure the mysql User Password. you can access it locally through phpmyadmin, but it cannot be accessed within the LAN, the modified mysql configuration file contains the following lines:

Where is the real configuration file of mysql in ubuntu?

By defaultmysqlThe configuration file is located in/etc/mysql/mysql.conf.d/And installed by defaultmysqlUserootThe account can only log on to the local machine

To remotely log on to mysql, you need to authorize the account in mysql. modifying the mysql configuration file cannot implement this function.
The specific command is:
GRANT ALL PRIVILEGES ON.TO 'username' @ '%' identified by 'password'; Grant remote logon permission

Grant all privileges on database. * TO 'username' @ '%' identified by 'password'; GRANT remote logon TO access only a database)

Flush privileges; effective immediately

The location is/etc/mysql. conf. d/mysqld. cnf.
The real configuration file is

Modify the configuration of a listener. [Mysqld]
Bind-address = Set to the IP address to be connected. Comment out the ip address if you do not know it.

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.