mysql 数据库大小
information_schema库中包含了对整个数据库的很多统计信息,可以通过查看它们,来得到数据库相关的信息。
mysql> use information_schema;
Database changed
mysql> select count(1) as tables, concat(round(sum(table_rows)/1000000,2),'M') as rows, concat(round(sum(data_length)/(1024*1024*1024),2),'G') as data, concat(round(sum(index_length)/(1024*1024*1024),2),'G') as idx, concat(round(sum(data_length+index_length)/(1024*1024*1024),2),'G') as total_size,round(sum(index_length)/sum(data_length),2) as idxfrac from tables;
+--------+--------+--------+-------+------------+---------+
| tables | rows | data | idx | total_size | idxfrac |
+--------+--------+--------+-------+------------+---------+
| 719 | 96.41M | 30.17G | 9.63G | 39.80G | 0.32 |
+--------+--------+--------+-------+------------+---------+
1 row in set (1 min 9.64 sec)
相关文档:
默认情况下Linux内的mysql数据库mysql,user表内的用户权限只是对localhost即本机才能登陆。需要更改权限:
如下的方式确认:
root#mysql -h localhost-u mysql -p
Enter password: ******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connectio ......
示例演示了用C#操作MySQL的方法,提供了三个可重用的类MySqlDBUtil,MySqlPageUtil,Page。
本示例由 C#操作Access数据库的简单例子(http://www.albertsong.com/read-56.html)修改而来。
1.首先下载MySQL数据库的.NET驱动
http://dev.mysql.com/get/Downloads/Connector-Net/mysql-connector-net-5.0.8.1-noinstall.zip/ ......
配置TOMCAT+ECLIPSE+MYSQL的JSP环境
关键词: JSP环境配置 TOMCAT+ECLIPSE+ &nbs ......
MySQL 命令行
1、mysql服务的启动和停止
net stop mysql
net start mysql
2、登陆mysql
语法如下: mysql -u用户名 -p用户密码
键入命令mysql -uroot -p, 回车后提示你输入密码,输入12345,然后回车即可进入到mysql中了,mysql的提示符是:
mysql>
注意,如果是连接到另外的机器上,则需要加入一个参数-h机器I ......