为mysql创建和授权用户

1.创建用户

GRANT USAGE ON *.* TO 'cms'@'%' IDENTIFIED BY '!zk2016' WITH GRANT OPTION;

2.为用户授权

GRANT all privileges ON *.*  TO 'cms'@'%' IDENTIFIED BY '!zk2016';

3.生效授权,创建完毕

FLUSH PRIVILEGES;

参考网址:
http://blog.csdn.net/fly0744/article/details/8889586
http://www.cnblogs.com/wanghetao/p/3806888.html

    原文作者:玄月府的小妖在debug
    原文地址: https://www.jianshu.com/p/bd17aa653622
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞