zoukankan      html  css  js  c++  java
  • MYSQL常用命令 MyISAM to InnoDB, max connections , GRANT ALL PRIVILEGES , mysqldump 等等

    Date_add

    SELECT OrderId,DATE_ADD(OrderDate,INTERVAL 2 DAY) AS OrderPayDate FROM Orders

    MyISAM to InnoDB

    ALTER TABLE  boblog_blogs     ENGINE=InnoDB;
    ALTER TABLE  boblog_calendar  ENGINE=InnoDB;

    max connections

    show global variables like "%max_con%";

    set global max_connections xxx;

    GRANT ALL PRIVILEGES

    GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'sa123' WITH GRANT OPTION;
    GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;

    flush privileges;

     mysqldump

    mysqldump -uroot -pabc123 qida_prd_20151122_1753 >qida_prd_20151124_0013.sql

    mysql -uroot -p qida2_t001<F:asp db backupmysqlsql script1511qd_shop.sql

    查询死锁等

    show processlist;

    给表加索引

    ALTER TABLE `income` ADD INDEX uid ( `uid` ) ;

    update from

    update `log` a inner join `logs` b on a.`accountuin` = b.`accountuin`
    set a.`uin` = b.`uin` where a.`accountuin` = b.`accountuin`

  • 相关阅读:
    8086汇编 学习1
    微信小程序 websocket+node.js(ws)
    kali安装google 浏览器
    bugkuctf Easy_Re
    课设记录-Day06
    GitLab使用教程
    课设记录-Day05
    课设记录-Day04
    课设记录-Day03
    课设记录-Day02
  • 原文地址:https://www.cnblogs.com/zero530/p/5035560.html
Copyright © 2011-2022 走看看