`

Mysql数据库远程不能连的2个主要原因

阅读更多



 .
 分类: MYSQL2006-11-02 19:48362人阅读评论(0)收藏举报


1、没有在数据库建立远程登陆账号
 

 GRANT ALL PRIVILEGES ON *.* TO  'name'@'%' IDENTIFIED BY 'pwd' WITH GRANT OPTION;

 
2、配置my.cnf 
  如果在mysql配置文件中有skip-networking就不能远程登陆即使建立了远程账号
 
 
 

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking
 
 
 
给指定数据表建立用户远程访问,并指定权限
 
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP  ON TableName.*     TO 'uname'@'%'      IDENTIFIED BY 'pwd';

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics