zoukankan      html  css  js  c++  java
  • mysql5.6和5.7的权限密码设置

    mysql5.6
    grant all privileges on *.* to root@'%' identified by "mysql_pwd" with grant option;
    grant all privileges on *.* to root@'localhost' identified by "mysql_pwd" with grant option;
    grant all privileges on *.* to root@'127.0.0.1' identified by "mysql_pwd" with grant option;
    drop database if exists test;
    use mysql;
    delete from user where not (user='root');
    delete from db where user='';
    UPDATE user SET password=PASSWORD('mysql_pwd') WHERE user='root' AND host='127.0.0.1' OR host='%' OR host='localhost';
    delete from user where password='';
    flush privileges;
    select user,password,host from mysql.user;
    exit;


    mysql5.7:
    grant all privileges on *.* to root@'%' identified by "mysql_pwd" with grant option;
    grant all privileges on *.* to root@'localhost' identified by "mysql_pwd" with grant option;
    grant all privileges on *.* to root@'127.0.0.1' identified by "mysql_pwd" with grant option;
    drop database if exists test;
    use mysql;
    delete from user where not (user='root');
    delete from db where user='';
    delete from user where authentication_string='';
    update mysql.user set authentication_string=password('mysql_pwd') where user='root' AND host='127.0.0.1' OR host='%' OR host='localhost';
    flush privileges;
    select user,authentication_string,host from mysql.user;
    exit;

  • 相关阅读:
    RHEL5.8配置开机自动挂载磁盘
    RHEL5.8配置NFS服务
    Linux环境下Oracle数据库启动停止命令
    使用的组件:Layui
    使用的组件:Jcrop
    使用的组件:ckeditor
    使用的组件:Web Uploader
    WebSphere试用过期问题处理
    webpack学习笔记(一)
    如何用node命令和webpack命令传递参数 转载
  • 原文地址:https://www.cnblogs.com/ddif/p/9956585.html
Copyright © 2011-2022 走看看