• 杂项


    CREATE DATABASE IF NOT EXISTS yourdbname DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
    GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP, ALTER ON ELEPayServer.* TO usereleusr@'%' Identified by 'passwd'; 增加权限
    
    REVOKE SELECT, INSERT, UPDATE, DELETE, CREATE, DROP,ALTER ON `ELEPayServer`.* FROM 'usereleusr'@'%'; 去掉权限
    
    SELECT DISTINCT CONCAT('User: ''',user,'''@''',host,''';') AS query FROM mysql.user;  查看所有用户
    
    show grants for user@'ip' 查看某个用户赋予的权限
    
    REVOKE 权限 ON *.* FROM 'user'@'%';查到什么权限删什么权限
    
    select host,user from mysql.user; 查看mysql 用户权限
    
    Delete FROM user Where User='root' and host='ip'; 删除用户
    
    update mysql.user set Host='%' where HOST='localhost' and User='root';  mysql5.7 允许root远程访问
    update user set authentication_string=password('123456') where user='app' and Host='localhost';  更新密码
     
    flush privileges;
    

      

      

  • 相关阅读:
    php数组
    php运算符
    PHP数据类型
    面向对象3和继承
    面向对象2
    面向对象1
    语法整理php
    语法整理
    ajax
    数据库4
  • 原文地址:https://www.cnblogs.com/Tempted/p/8289283.html
Copyright © 2020-2023  润新知