Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
474 views
in Technique[技术] by (71.8m points)

mysql - 允许从任何IP地址远程访问MySQL数据库(grant remote access of MySQL database from any IP address)

I am aware of this command:

(我知道此命令:)

GRANT ALL PRIVILEGES
ON database.*
TO 'user'@'yourremotehost'
IDENTIFIED BY 'newpassword';

But then it only allows me to grant a particular IP address to access this remote MySQL database.

(但是,这只允许我授予特定的IP地址来访问此远程MySQL数据库。)

What if I want it so that any remote host can access this MySQL database?

(如果我想要它,以便任何远程主机都可以访问该MySQL数据库怎么办?)

How do I do that?

(我怎么做?)

Basically I am making this database public so everyone can access it.

(基本上,我将此数据库公开,因此每个人都可以访问它。)

  ask by adit translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
TO 'user'@'%'

%是一个通配符-你也可以做'%.domain.com''%.123.123.123'之类的东西,如果你需要。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...