zoukankan      html  css  js  c++  java
  • MySQL数据库的常用命令

    1.创建数据库指定字符集:

    CREATE DATABASE db_name DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci

     2.新建用户:

    create user 'hive'@'localhost' identified by '123456';

    如果提示:ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables错误

    输入:flush privileges;  //直译:更新权限   即可解决

     3.查询mysql现有用户

     select host,user,authentication_string from mysql.user;

    4.给新用户授权

    grant all privileges on `hive`.* to 'hive'@'localhost'; 

    5.更新权限

    grant all privileges on `hive`.* to 'hive'@'localhost';
    flush privileges;

    6.查看用户权限

    show grants for 'xxx'@'localhost';

    7.linux备份+windos还原

     

    持续更新...

  • 相关阅读:
    JS 按钮下一步(onclick点击事件)
    socketserver模块
    进程
    僵尸进程和孤儿进程
    守护进程
    互斥锁
    进程间通信=>IPC机制
    生产者消费者模型
    线程
    守护线程
  • 原文地址:https://www.cnblogs.com/litstar/p/12045894.html
Copyright © 2011-2022 走看看