zoukankan      html  css  js  c++  java
  • 解决不能访问远程mysql的问题

    一般是没有给用户访问权限

    给用户test_user授权,让他可以从外部登陆和本地登陆
    注意:@左边是用户名,右边是域名、IP和%,表示可以访问mysql的域名和IP,%表示外部任何地址都能访问。

     
    mysql> grant all privileges on *.* to 'test_user'@'localhost' identified by 'test_user';  
    Query OK, 0 rows affected (0.00 sec)  
    mysql> grant all privileges on *.* to 'test_user'@'%' identified by 'test_user';  
    Query OK, 0 rows affected (0.00 sec)  
    mysql> select user,host,password from mysql.user;  
  • 相关阅读:
    spoj705
    bzoj2440
    spoj220
    bzoj2301
    hdu1695
    poj3294
    hdu3518
    poj3693
    函数
    样式
  • 原文地址:https://www.cnblogs.com/yansum/p/5858182.html
Copyright © 2011-2022 走看看