select table_name,table_rows,data_length/1024/1024 data_length,create_time,table_collation from information_schema.tables where table_schema = 'lir' order by table_rows desc [dss@localhost ~]$ mysql -u root -p enter password: welcome to th
select table_name,table_rows,data_length/1024/1024 data_length,create_time,table_collation from
information_schema.tables where table_schema = 'lir' order by table_rows desc
[dss@localhost ~]$ mysql -u root -p enter password: welcome to the mysql monitor. commands end with ; or \g.your mysql connection id is 36server version: 5.6.16 mysql community server (gpl)copyright (c) 2000, 2014, oracle and/or its affiliates. all rights reserved.oracle is a registered trademark of oracle corporation and/or itsaffiliates. other names may be trademarks of their respectiveowners.type 'help;' or '\h' for help. type '\c' to clear the current input statement.mysql> show database;error 1064 (42000): you have an error in your sql syntax; check the manual that corresponds to your mysql server version for the right syntax to use near 'database' at line 1mysql> show databases;+--------------------+| database |+--------------------+| information_schema || fire || hive || lir || mysql || performance_schema || test |+--------------------+7 rows in set (0.03 sec)mysql> use fire;reading table information for completion of table and column namesyou can turn off this feature to get a quicker startup with -adatabase changedmysql> load data infile 'aa.txt' into table firewallb;error 13 (hy000): can't get stat of '/var/lib/mysql/fire/aa.txt' (errcode: 2 - no such file or directory)mysql> load data infile '/home/dss/aa.txt' into table firewallb;error 13 (hy000): can't get stat of '/home/dss/aa.txt' (errcode: 13 - permission denied)mysql> load data infile '/tmp/aa.txt' into table firewallb;query ok, 10 rows affected (0.07 sec)records: 10 deleted: 0 skipped: 0 warnings: 0mysql> load data infile '/tmp/fireb.txt' into table firewallb;
query ok, 16600931 rows affected (38 min 25.54 sec)records: 16600931 deleted: 0 skipped: 0 warnings: 0
导入数据文件到mysql
mysql导出数据到文件
select * into outfile '/tmp/bb.csv' fields terminated by ',' lines terminated by '\r\n' from bb_month;