Mac Navicat远程连接群晖MariaDB 10


Mac Navicat远程连接群晖MariaDB 10

使用工具

  1. Navicat Premium 15.0.30
  2. FinalShell 3.9.2.2

Navicat Premium连接错误如下表:

序号 问题描述 备注
1 2013 - Lost connection to MySQL server at 'reading initial communication packet', system error: 0 "Internal error/check (Not system error)"
2013 -在“读取初始通信数据包”时与MySQL服务器失去连接,系统错误:0“内部错误/检查(不是系统错误)”
2 2013 - Lost connection to MySQL server at 'waiting for initial communication packet', system error: 60 "Operation timed out"
2013 -在“等待初始通信数据包”时与MySQL服务器失去连接,系统错误:60“操作超时”
3 Failed to save password Error code: -34018
无法保存密码错误 代码:-34018
Navicat for mac tnt发布的破解版本不完美,存在数据库密码无法保存的问题,如果选择保存密码,连接的时候会提示“failed to save password error code -34018”。
登录群辉 SSH 连接成功
1 cxloge@DS218plus:~$ ls
BaiduNetdisk base-notebook Download Drive @eaDir honornote10 Huawei music Nutstore #recycle XiaoMiLuYouQi XiaoMi-usb0 待处理文件
2 执行命令查看MariaDB 安装位置 cxloge@DS218plus:~$ ps -ef | grep mysql
获取路径/usr/local/mariadb10/bin/ cxloge 10442 24267 0 00:46 pts/21 00:00:00 grep --color=auto mysql root 28126 1 0 Sep04 ? 00:00:00 /bin/sh /usr/local/mariadb10/bin/mysqld_safe --datadir=/var/packages/MariaDB10/target/mysql --pid-file=/run/mysqld/mysqld10.pid mysql 28282 28126 0 Sep04 ? 00:00:02 /usr/local/mariadb10/bin/mysqld --basedir=/usr/local/mariadb10 --datadir=/var/packages/MariaDB10/target/mysql --plugin-dir=/usr/local/mariadb10/lib/mysql/plugin --user=mysql --log-error=/var/packages/MariaDB10/target/mysql/DS218plus.err --pid-file=/run/mysqld/mysqld10.pid --socket=/run/mysqld/mysqld10.sock --port=3307
3 进入mariadb10/bin/目录 cxloge@DS218plus:~$ cd /usr/local/mariadb10/bin/
4 连接MySQL cxloge@DS218plus:/usr/local/mariadb10/bin$ ./mysql -uroot -p
Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
5 密码错误,再次连接MySQL cxloge@DS218plus:/usr/local/mariadb10/bin$ ./mysql -uroot -p
Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 223 Server version: 10.3.24-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.
6 修改数据库 MariaDB [(none)]> use mysql
Database changed
7 更新数据 MariaDB [mysql]> update user set host = '%' where user = 'root';
ERROR 1062 (23000): Duplicate entry '%-root' for key 'PRIMARY'
8 root'@'192.168.XX.XX --root用户与数据库主机IP MariaDB [mysql]> grant all privileges on . to 'root'@'192.168.XX.XX' identified by 'root' with grant option;
ERROR 1819 (HY000):您的密码不满足当前策略要求:[最小密码长度 10,包括大小写混合,包括数字字符,包括特殊字符,从密码中排除用户名] ERROR 1819 (HY000): Your password does not satisfy the current policy requirements: [Minimal password length 10, Include mixed case, Include numeric characters, Include special characters, Exclude name of user from password]
9 MariaDB [mysql]> select host,user from user;
+-----------+------+
| host | user |
+-----------+------+
| % | root |
| 127.0.0.1 | root |
| ::1 | root |
+-----------+------+
3 rows in set (0.306 sec)
10 更新root用户密码 MariaDB [mysql]> set password for root@'%'=password('输入root用户密码');
ERROR 1133 (28000): Can't find any matching row in the user table
11 更新root用户密码 MariaDB [mysql]> set password for root@'%'=password('输入root用户密码');
ERROR 1133 (28000): Can't find any matching row in the user table
12 刷新系统权限表 MariaDB [mysql]> flush privileges;
Query OK, 0 rows affected (1.403 sec)
13 更新root用户密码 MariaDB [mysql]> set password for root@'%'=password('输入root用户密码');
Query OK, 0 rows affected (0.045 sec)
14 刷新系统权限表 MariaDB [mysql]> flush privileges;
Query OK, 0 rows affected (0.000 sec)
15 MariaDB [mysql]>
连接断开

参考链接

群辉 MariaDB 10 远程连接 - ㄡ落叶风行 - 博客园

https://www.cnblogs.com/baily/p/11845446.html


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM