遠端存取Ubuntu下的MySQL資料庫

來源:互聯網
上載者:User

在Ubuntu下MySQL預設是只允許本地訪問的,如果你要其他機器也能遠程夠訪問MySQL資料庫的話,需要設定一些東西

修改/etc/mysql/my.cnf

注釋掉這句話 bind-address = 127.0.0.1

給某一台主機訪問資料庫的許可權

grant all privileges on weguan.* to test@202.101.222.111 identified by 'password'

注意:
1.202.101.222.111是欲串連到此mysql資料庫的用戶端的IP地址。

2.password就是mysql資料庫test使用者的password,根據實際情況需要修改。

Ubuntu安裝的mysql表名是大小寫相關的。要使Ubuntu的mysql忽略表名大小寫,可以在my.cnf的[mysqld]下添加

lower_case_table_names=1 

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.