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