Mac Navicat遠程連接群暉MariaDB 10
使用工具
- Navicat Premium 15.0.30
- 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 遠程連接 - ㄡ落葉風行 - 博客園