灌溉梦想,记录脚步
« »
2014年5月2日技术合集

MySQL任意主机用户无法登录

在创建MySQL用户时,选择登录主机为“%”,意思为所有主机均可以连接。

命令如下:
grant all privileges on *.* to ‘kevin’@’%’ identified by ‘password’ with grant option;

创建完成后,登录发现提示如下错误:
ERROR 1045 (28000): Access denied for user ‘kevin’@’localhost’ (using password: YES)

从逻辑上说,%代表所有主机,为什么使用“localhost”就是不行呢?或者也有一种可能性,“%”不包括“localhost”主机,而创建连接时使用到了“localhost”。

新增用户@localhost:
grant all privileges on *.* to ‘kevin’@’localhost’ identified by ‘password’ with grant option;

刷新权限,登录成功。
flush privileges;

日志信息 »

该日志于2014-05-02 14:13由 kevin 发表在技术合集分类下, 你可以发表评论。除了可以将这个日志以保留源地址及作者的情况下引用到你的网站或博客,还可以通过RSS 2.0订阅这个日志的所有评论。

13 条评论

  1. androxal saturday delivery cod

    how to buy androxal cheap canada

  2. enclomiphene online no prescription overnight

    cheap enclomiphene online mastercard accepted

  3. online order rifaximin cheap usa

    get rifaximin price in us

  4. buying xifaxan cheap next day delivery

    order xifaxan generic medications

  5. staxyn special price

    discount staxyn australia cheap

  6. buy cheap avodart without prescriptions canada

    buy avodart san francisco

  7. cheap dutasteride cheap prescription

    order dutasteride cheap now

  8. how to buy flexeril cyclobenzaprine cheap next day delivery

    cheapest buy flexeril cyclobenzaprine cost of tablet

  9. gabapentin online no rx

    how to order gabapentin generic low price

  10. cheapest buy fildena cheap mastercard

    cheapest buy fildena usa price

  11. cheap itraconazole no prescription mastercard

    Order perscription free itraconazole

  12. kamagra přepraveno přes noc bez lékařského předpisu

    kamagra bez předpovědi

  13. prix de kamagra 100 mg numéro 30

    sans ordonnance kamagra prescrire eu medicament pharmacie

发表回复