Home > Database > Mysql Tutorial > body text

远程访问Ubuntu下的MySQL数据库

WBOY
Release: 2016-06-07 16:51:38
Original
995 people have browsed it

在Ubuntu下MySQL缺省是只允许本地访问的,如果你要其他机器也能远程够访问MySQL数据库的话,需要设置一些东西 修改/etc/mysql/my

在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 

linux

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template