zoukankan      html  css  js  c++  java
  • mysql的cmd窗口查看数据库信息

    1.mysql -uroot -p 123456

    2.show databases; 查看全部数据库

    3.select database(); 查看当前数据库

    4.show variables like 'port';

    5. 查看当前数据库大小,如查看springdata库大小

    select concat(round(sum(data_length)/(1024*1024),2) + round(sum(index_length)/(1024*1024),2),'MB') as 'DB Size'
    -> from tables
    -> where table_schema='springdata';

    6. 查看数据所占有的空间

    select concat(round(sum(data_length)/(1024*1024),2),'MB') as 'DB Size'
    -> from tables
    -> where table_schema='springdata';

    7.查看索引所占用的空间

    select concat(round(sum(index_length)/(1024*1024),2),'MB') as 'DB Size'
    -> from tables
    -> where table_schema='INVOICE';

    8.查看数据库编码

     show variables like 'character%';

    9.status

    10.show tables;

    11. 查看权限

      show grants for 'root'@'localhost';

    12.某个人的权限

    show grants for 'root'@'localhost';

  • 相关阅读:
    [swustoj 411] 售货员的难题
    白书P61
    白书P60
    [ZOJ 3471] Most Powerful
    [HDU 3001] Travelling
    [转] acmer必看的26个对acm态度
    [HDU 1254] 推箱子
    [POJ 3311] Hie with the Pie
    [POJ 3254] Corn Fields
    power
  • 原文地址:https://www.cnblogs.com/springcloud/p/9978232.html
Copyright © 2011-2022 走看看