群晖 MariaDB10 开启远程登录

​情况:MariaDB设置了TCP/IP的端口,但是还是无法进行远程访问。

解决方法:

一、使用ssh登录群晖,并进入MariaDB安装目录

cd /volume1/@appstore/MariaDB10/usr/local/mariadb10/bin

二、使用root登录 MariaDB,然后进行修改

mysql -u root -p

MariaDB [(none)]> use mysql
Database changed
MariaDB [mysql]> update user set host = '%' where user = 'root';
ERROR 1062 (23000): Duplicate entry '%-root' for key 'PRIMARY'
MariaDB [mysql]> select host,user from user;
+-----------+------+
| host      | user |
+-----------+------+
| %         | root |
| 127.0.0.1 | root |
| ::1       | root |
+-----------+------+
3 rows in set (0.001 sec)

MariaDB [mysql]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.002 sec)

MariaDB [mysql]> 
posted @ 2024-01-09 10:49  李济宏(Amadeus)  阅读(497)  评论(0编辑  收藏  举报