Home > Database > Mysql Tutorial > MySQL中root远程连接_MySQL

MySQL中root远程连接_MySQL

WBOY
Release: 2016-06-01 13:44:58
Original
806 people have browsed it

bitsCN.com

 Create USER 'itpro'@'%' IDENTIFIED BY '123';

1、d:/mysql/bin/>mysql   -h   localhost   -u   root  
        //这样应该可以进入MySQL服务器
     mysql>update user set host = '%' where user = 'root';
mysql>select host, user from user;
  2、mysql>GRANT   ALL   PRIVILEGES   ON   *.*   TO   'root'@'%' IDENTIFIED BY 'mypassword'    WITH   GRANT   OPTION  
        //赋予任何主机访问数据的权限  
  3、mysql>FLUSH   PRIVILEGES  
        //修改生效  
  4、mysql>EXIT  
        //退出MySQL服务器  
  这样就可以在其它任何的主机上以root身份登录啦!

作者“兄弟无间”

bitsCN.com
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