#查看每个数据库所占磁盘大小 SELECT TABLE_SCHEMA AS "库名", , ) AS "表所占空间(MB)", , ) AS "索引所占空间(MB)", ,) AS "空间累计(MB)" FROM information_schema.`TABLES` GROUP BY `TABLE_SCHEMA`; #查看某个数据库各表所占磁盘大小 SELECT TABLE_NAME, , ) AS "DATA_
#走过,试过的路 UPDATE information_schema.`SCHEMATA` SET DEFAULT_COLLATION_NAME='utf8_general_ci' WHERE DEFAULT_COLLATION_NAME<>'utf8_general_ci'; #————尝试使用update语句来修改,这是走不通的,报以下错误 没有权限. #错误代码: 1044#Access denied for user 'root'@'%' to database 'informatio
查看所有mysql数据库表和索引大小 mysql查看当前所有的数据库和索引大小 ,),' mb') as data_size, concat(,),'mb') as index_size from information_schema.tables group by table_schema order by data_length desc; mysql查看当前某个数据库和数据库下所有的表的大小 ,),' mb') as data_size, concat(,),' mb') as index
1:show databases; 查看所有的数据库,等同于select schema_name from information_schema.schemata\G.\G 替换;,以纵向报表的形式输出结果,有利于阅读. 2. status 查看mysql数据库的运行状态 3. use 命令选择数据库 例如 use information_schema,当使用此命令后 select schema_name from information_schema.schemata\G,可以为 select
有时候在我们开发的过程中并不一定记得数据库的安装路径.比如要查看mysql 数据库的安装目录在哪里:我们可以通过mysql命令查看mysql的安装路径: # 以下两个sql任意一个可查询 select @@basedir as basePath from dual ; show variables like '%basedir%'; 上面可以看到基础的安装路径,查看数据库data的路径怎么看,很简单,把上面的参数变量换成datadir即可: # 以下查询任意一个均可 select @@datad
刚才控制台又报这个错,这是代表MySQL驱动和数据库字符集设置不搭配: 错误: "...Initial client character set can be forced via the 'characterEncoding' property." 解法: 在sqlMapConfig.xml中添加 <environments default="mysql"> <environment id="mysql"> <tr