navicat連線mysql常見故障

2021-08-29 03:50:58 字數 1943 閱讀 3471

出現這種報錯,首先檢查服務是否處於啟動狀態:

開啟cmd命令視窗,輸入service。

找到mysql對應的服務,檢視其狀態。

或者:給cmd命令視窗管理員許可權(通過建立其快捷方式並且修改高階)。

輸入net start mysql.(輸入之前最好檢查服務名是否為mysql 有的版本裝完後服務名為mysql+版本號)

c:\windows\system32>net start mysql

mysql 服務正在啟動 .

mysql 服務已經啟動成功。

遇到這種錯誤,是由於遠端連線未授權,解決方法如下:

c:\windows\system32>mysql -u root -p

enter password: ******

welcome to the mysql monitor. commands end with ; or \g.

your mysql connection id is 16

server version: 8.0.12 mysql community server - gpl

oracle is a registered trademark of oracle corporation and/or its

affiliates. other names may be trademarks of their respective

owners.

type 'help;' or '\h' for help. type '\c' to clear the current input statement.

mysql> use mysql;

database changed

mysql> update user

-> set host='10.29.6.99'

-> where user='root';

query ok, 1 row affected (0.08 sec)

rows matched: 1 changed: 1 warnings: 0

mysql> create user 'tom'@'10.29.6.99' identified by '123456';

query ok, 0 rows affected (0.08 sec)

mysql> grant all on *.* to 'tom'@'10.29.6.99';

query ok, 0 rows affected (0.06 sec)

mysql> flush privileges;

query ok, 0 rows affected (0.01 sec)

mysql> select user,host from user;

+------------------+------------+

| user | host |

+------------------+------------+

| root | 10.29.6.99 |

| tom | 10.29.6.99 |

| mysql.infoschema | localhost |

| mysql.session | localhost |

| mysql.sys | localhost |

+------------------+------------+

5 rows in set (0.00 sec)

Navicat 連線 Mysql 出現1251錯誤

出現這個原因是mysql8 之前的版本中加密規則是mysql native password 解決辦法 先輸入 alter user root localhost identified by password password expire never 修改加密規則 再輸入alter user ro...

使用Navicat遠端連線MySQL

原因是mysql的使用者預設是沒有遠端訪問許可權的,因此當訪問程式與資料庫不是在同一伺服器時,就無法訪問了。解決辦法有兩種 1.授權法 賦予任何主機訪問資料的許可權 root kerwin usr local mysql bin mysql u root p mysql grant all priv...

navicat連線遠端mysql伺服器

開啟mysql配置檔案,將檔案中的bind address 伺服器本地ip位址 這句話注釋掉,或者改為0.0.0.0,表示允許所有的ip訪問3306埠連線資料庫 sudo vim etc mysql my.conf includedir etc mysql conf.d includedir etc...