mariadb配置允许远程访问方式
Posted 科技学习生活
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mariadb配置允许远程访问方式相关的知识,希望对你有一定的参考价值。
[root@localhost ~]# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 5.5.60-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [mysql]> select 'host' from user where user='root';
+------+
| host |
+------+
| host |
| host |
| host |
+------+
3 rows in set (0.00 sec)
MariaDB [mysql]> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'IDENTIFIED BY '123456' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)
MariaDB [mysql]> flush privileges;
以上是关于mariadb配置允许远程访问方式的主要内容,如果未能解决你的问题,请参考以下文章