Home > Database > Mysql Tutorial > fedora 16 mysql远程连接_MySQL

fedora 16 mysql远程连接_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:49:21
Original
1013 people have browsed it

Fedora

bitsCN.com

  默认情况下,mysql只能本地登陆。

  如果需要远程连接,需要在root下创建一个账号。

格式如:grant all privileges on  *.* to abc123@"#" identified by "password";

'%' 表示任何ip都可以登陆,如过希望特定ip登陆,可以指明特定的ip。

 

在fedora 16 中,默认3306端口是关闭的,我们需要打开端口才能进行登陆。

vi /etc/sysconfig/iptables

添加如下字符串

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT

重启iptables即可连接。

bitsCN.com
Related labels:
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
Latest Issues
MySQL stops process
From 1970-01-01 08:00:00
0
0
0
Error when installing mysql on linux
From 1970-01-01 08:00:00
0
0
0
phpstudy cannot start mysql?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template