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`

  • 相关阅读:
    APP支付,后台支付宝生成预支付设置超时时间timeout_express无效,使用time_expire代替
    一些学习资料
    自连接
    模型成员
    模型查询
    模板
    管理站点
    视图
    设计模型
    搭建开发环境
  • 原文地址:https://www.cnblogs.com/zero530/p/5035560.html
Copyright © 2011-2022 走看看