那就只grant那台机器访问你机器上的某个数据库就行了。 示例, 假设用的是webdb,开发用户webdb给它,密码是webdb**** (自己定) create database webdb; grant all privileges on webdb.* to webdb@'183.1.210.85' identified by 'webdb_****'; flush privileges;
mysql -h183.1.210.85 -uwebdb -pwebdb_ 提示 Can't not connect to MySQL server on '183.1.210.85'
grant all privileges on webdb.* to 'webdb'@'%'identified by 'webdb_****'; flush privileges;
如果只是想搞个网站什么的,只允许本机访问就够了。
示例, 假设用的是webdb,开发用户webdb给它,密码是webdb**** (自己定)
create database webdb;
grant all privileges on webdb.* to webdb@'183.1.210.85' identified by 'webdb_****';
flush privileges;
提示 Can't not connect to MySQL server on '183.1.210.85'
flush privileges;
从那台机器上连的话应该是-h 183.1.210.80
呵呵。