MARIADB Allow remote access

Source: Internet
Author: User

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 MySQL

2

3 Database changed

4MariaDB [mysql]> Update user set host = '% ' where user = ' root ';

5

6Query OK, 1 row affected (0.11 sec)

7

Rows matched:1 changed:1 warnings:0

Replication code grants any host access to data:

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.

MARIADB Allow remote access

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.