MARIADB Remote Connection Configuration

Source: Internet
Author: User

Since MARIADB is developed by a branch of MySQL, the configuration is generally the same.

1 [Email protected]:~# mysql-uroot-proot

Enter the MARIADB server and change the value of the Mysql.user host field to% to indicate that you can log on to the MySQL server as root on any client machine, and it is recommended that you set it to% at development time.

1 MariaDB [(none)]> use Mysql2 3 Database changed4 MariaDB [mysql]> Update user set host = '% ' where user = ' root '; 5 6 Query OK, 1 row affected (0.11 sec) 7 Rows matched:1  changed:1  warnings:0

To grant access to data to any host:

1 MariaDB [mysql]> GRANT all privileges on * * to ' root ' @ '% ' identified by ' root ' 2 with GRANT option;3 Query OK, 0 rows Affected (0.00 sec)

Refresh the permissions configuration to make it effective:

1 MariaDB [mysql]> FLUSH privileges;

You can then log on to the database using root on any other host.

Problems that may occur:

Connect to remote database times the following error:

1 c:\users\wex>mysql-h remote.wex-uroot-proot2 ERROR 2003 (HY000): Can ' t connect to MySQL server on ' Remote.wex ' (10 060)

The possible causes of the problem and the corresponding solutions are organized as follows:

1. Skip-networking is configured in the MY.CNF configuration file

Skip-networking This parameter, so that all TCP/IP ports are not listening, that is, the native, other clients can not connect to the MySQL server network

So you need to comment out this parameter.

Parameter configuration for bindaddress in 2.MY.CNF configuration file

Bindaddress, there are bind-address, this parameter is to specify which IP addresses are configured so that the MySQL server only responds to which IP address requests, so this parameter needs to be commented out.

3. Causes of Firewalls

Shut down the firewall by/etc/init.d/iptables stop

My problem is caused by this reason. Shutting down the MySQL server's firewall is ready to use.

    • This article is from: Linux Tutorial Network

MARIADB Remote Connection Configuration

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.