国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學(xué)院 > 開發(fā)設(shè)計(jì) > 正文

Ubuntu14.04下如何開啟Mysql遠(yuǎn)程訪問

2019-11-08 20:54:05
字體:
供稿:網(wǎng)友

在目錄/etc/MySQL下找到my.cnf,用vim編輯,找到my.cnf里面的

#bind-address = 127.0.0.1

將其只能本地ip訪問的代碼進(jìn)行注釋

然后用root登陸Mysql數(shù)據(jù)庫

im@58user:~$ mysql -u root -pEnter passWord: Welcome to the MySQL monitor. Commands end with ; or /g.Your MySQL connection id is 6Server version: 5.5.53-0Ubuntu0.14.04.1 (Ubuntu)Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '/h' for help. Type '/c' to clear the current input statement.mysql>

然后在執(zhí)行

mysql> grant all on *.* to root@'%' identified by '123';myslq> flush PRivileges;

最后就可以在遠(yuǎn)程用剛才創(chuàng)建的用戶和密碼登陸mysql。

在執(zhí)行對用戶授權(quán)密碼的時候可能會遇到下面的錯誤:

ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement

解決方法:

先刷新一下權(quán)限表。 mysql> flush privileges; Query OK, 0 rows affected (0.01 sec) mysql> grant all on cactidb.* to dbuser@’localhost’ identified by ‘123’; Query OK, 0 rows affected (0.00 sec)


發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 壤塘县| 读书| 龙陵县| 祁东县| 同江市| 土默特左旗| 高要市| 松滋市| 罗甸县| 荔波县| 姚安县| 白玉县| 曲阜市| 汶川县| 永吉县| 永昌县| 莲花县| 舟曲县| 枞阳县| 丹寨县| 宝应县| 广宗县| 新安县| 甘洛县| 光山县| 田林县| 陈巴尔虎旗| 万全县| 囊谦县| 新源县| 都江堰市| 泗阳县| 当雄县| 庄河市| 烟台市| 阿合奇县| 大同县| 讷河市| 深州市| 读书| 云安县|