隨筆-20  評(píng)論-35  文章-0  trackbacks-0

          如果你想連接你的mysql的時(shí)候發(fā)生這個(gè)錯(cuò)誤:

          ERROR 1130: Host '192.168.1.3' is not allowed to connect to this MySQL server

          解決方法:
          1。 改表法。可能是你的帳號(hào)不允許從遠(yuǎn)程登陸,只能在localhost。這個(gè)時(shí)候只要在localhost的那臺(tái)電腦,登入mysql后,更改 "mysql" 數(shù)據(jù)庫(kù)里的 "user" 表里的 "host" 項(xiàng),從"localhost"改稱"%"

          mysql -u root -pvmwaremysql>use mysql;mysql>update user set host = '%' where user = 'root';mysql>select host, user from user;

          2. 授權(quán)法。例如,你想myuser使用mypassword從任何主機(jī)連接到mysql服務(wù)器的話。

          GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
          如果你想允許用戶myuser從ip為192.168.1.3的主機(jī)連接到mysql服務(wù)器,并使用mypassword作為密碼
          GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.1.3' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;

          GRANT ALL PRIVILEGES ON *.* TO 'root'@'10.10.40.54' IDENTIFIED BY '123456' WITH GRANT OPTION;

          posted on 2008-09-17 11:08 coolies 閱讀(66283) 評(píng)論(11)  編輯  收藏 所屬分類: 數(shù)據(jù)庫(kù)

          評(píng)論:
          # re: Mysql:is not allowed to connect to this MySQL server 2012-03-27 13:45 | hfzx
          學(xué)習(xí)了,不錯(cuò)不錯(cuò)。  回復(fù)  更多評(píng)論
            
          # re: Mysql:is not allowed to connect to this MySQL server 2012-12-20 18:16 | wanghu
          # re: Mysql:is not allowed to connect to this MySQL server[未登錄] 2013-01-10 16:40 | wang
          # re: Mysql:is not allowed to connect to this MySQL server[未登錄] 2013-08-01 17:40 | dada
          博主厲害,解決了我的問題。  回復(fù)  更多評(píng)論
            
          # re: Mysql:is not allowed to connect to this MySQL server 2014-02-28 14:57 | 寧安信息網(wǎng)
          完全正確,但一定要記住改完表要重啟MYSQL服務(wù)  回復(fù)  更多評(píng)論
            
          # re: Mysql:is not allowed to connect to this MySQL server 2014-03-23 21:43 | 煙不離手
          感謝樓主  回復(fù)  更多評(píng)論
            
          # re: Mysql:is not allowed to connect to this MySQL server 2014-04-11 11:35 | 寧安信息網(wǎng)
          有些東西其實(shí)不是你寫的不對(duì),只是不夠細(xì)心  回復(fù)  更多評(píng)論
            
          # re: Mysql:is not allowed to connect to this MySQL server 2014-07-05 14:40 | 友情鏈接
          這個(gè)在哪里改呢?怎么找不到  回復(fù)  更多評(píng)論
            
          # re: Mysql:is not allowed to connect to this MySQL server 2015-04-27 10:10 | 黑蕊罌粟
          謝謝 整好了  回復(fù)  更多評(píng)論
            
          # re: Mysql:is not allowed to connect to this MySQL server 2015-05-20 17:03 | 秦天
          博主勃起!  回復(fù)  更多評(píng)論
            
          # re: Mysql:is not allowed to connect to this MySQL server[未登錄] 2016-02-17 13:48 | 小弟
          博主厲害,解決了我的問題。  回復(fù)  更多評(píng)論
            

          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 广宗县| 临猗县| 绍兴市| 绥江县| 四川省| 仁寿县| 云梦县| 西贡区| 汝州市| 达日县| 五华县| 金秀| 桃园县| 龙口市| 吉水县| 郯城县| 中牟县| 邵阳市| 樟树市| 梨树县| 昌平区| 莎车县| 黎平县| 梧州市| 饶河县| 长海县| 新河县| 沙洋县| 武穴市| 彭水| 内乡县| 灵武市| 溆浦县| 阿克| 崇义县| 中江县| 迭部县| 海宁市| 宜春市| 东平县| 阳西县|