晖的套件中安装的MariaDB10,远程访问默认关闭的,可以通过以下命令开启。
首先进入群晖控制台开机SSH服务 控制面板–终端机和SNMP–终端机–启用SSH功能 勾选
然后使用客户端putty SSH登陆到群晖
Eagle@Eagle:~nbsp;sudo
-i
root@Eagle:~# cd /volume1/@appstore/MariaDB10/usr/local/mariadb10/bin
root@Eagle:~# ./mysql -u root -p
root@Eagle:/volume1/@appstore/MariaDB10/usr/local/mariadb10/bin# ./mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 230
Server version: 10.3.11-MariaDB Source distribution
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)]>
MariaDB [(none)]>
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| glpi |
| information_schema |
| mysql |
| performance_schema |
+--------------------+
4 rows in set (0.029 sec)
MariaDB [(none)]> use mysql;
Database changed
MariaDB [mysql]> select User,host from mysql.user;
+-----------+-----------+
| User | host |
+-----------+-----------+
| root | 127.0.0.1 |
| root | ::1 |
| glpi_user | localhost |
| root | localhost |
+-----------+-----------+
4 rows in set (0.018 sec)
MariaDB [mysql]> update user set host="%" where user="root" and host="localhost";
Query OK, 1 row affected (0.001 sec)
Rows matched: 1 Changed: 1 Warnings: 0
MariaDB [mysql]>
MariaDB [mysql]> select User,host from mysql.user;
+-----------+-----------+
| User | host |
+-----------+-----------+
| glpi_user | % |
| root | % |
| root | 127.0.0.1 |
| root | ::1 |
+-----------+-----------+
4 rows in set (0.001 sec)
MariaDB [mysql]>
MariaDB [mysql]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.001 sec)
MariaDB [mysql]>
然后使用客户端就可以远程登陆了
本文链接:https://www.aiunk.com/424/
“我的生命是属于你的,亚丝娜,我将为你而活。”
本站内容来源于互联网,所有转载、引用的文章、图片、视频等素材均来自网络公开渠道。我们对所转载的内容的版权和合法性不做任何保证。如果原作者或版权方认为本站内容侵犯其合法权益,敬请原作者或版权方及时联系我们,我们将在第一时间进行核实和处理,必要时删除相关内容。 本站的所有内容仅供个人学习与研究之用,不得用于任何商业用途。如需使用本站内容进行商业用途,请与原作者或版权所有者联系获取授权。 如有任何疑问或建议,请联系我们。
评论(0)