|
1106 5:18:52 [Warning] option 'table_definition_cache': unsigned value 100 adjusted to 400
151106 5:18:52 [Note] mysqld (mysqld 5.5.44-log) starting as process 74255 ...
151106 5:18:52 [Warning] Can't create test file /usr/local/mysql/data/ubuntu.lower-test
151106 5:18:52 [Warning] Can't create test file /usr/local/mysql/data/ubuntu.lower-test
151106 5:18:52 [Warning] One can only use the --user switch if running as root
mysqld: File '/usr/local/mysql/data/mysql-bin.index' not found (Errcode: 13)
151106 5:18:52 [ERROR] Aborting
abc@ubuntu:/usr/local/mysql/bin$ mysqldump -uroot -p(密码) --compact test t2 > ~/Downloads/testA.txt
abc@ubuntu:/usr/local/mysql/bin$ more ~/Downloads/testA.txt
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t2` (
`id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
INSERT INTO `t2` VALUES (1),(3),(1),(3),(1),(2147483647),(3),(1),(2147483647),(3),(1),(2147483647),(3);
abc@ubuntu:/usr/local/mysql/bin$ mysqldump -uroot -p(密码) --compact --default-character-set=latin1 test t2 > ~/Downloads/testA.txt
abc@ubuntu:/usr/local/mysql/bin$ more ~/Downloads/testA.txt
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t2` (
`id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
INSERT INTO `t2` VALUES (1),(3),(1),(3),(1),(2147483647),(3),(1),(2147483647),(3),(1),(2147483647),(3);
abc@ubuntu:/usr/local/mysql/bin$ mysqlshow -uroot -p(密码);
+--------------------+
| Databases |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sakila |
| test |
| test1 |
+--------------------+
abc@ubuntu:/usr/local/mysql/bin$ mysqlshow -uroot -p(密码) --count;
+--------------------+--------+--------------+
| Databases | Tables | Total Rows |
+--------------------+--------+--------------+
| information_schema | 40 | 20863 |
| mysql | 24 | 2214 |
| performance_schema | 17 | 14 |
| sakila | 33 | 50132 |
| test | 1 | 13 |
| test1 | 20 | 67 |
+--------------------+--------+--------------+
6 rows in set.
abc@ubuntu:/usr/local/mysql/bin$ mysqlshow -uroot -p(密码) test --count;
Database: test
+--------+----------+------------+
| Tables | Columns | Total Rows |
+--------+----------+------------+
| t2 | 1 | 13 |
+--------+----------+------------+
1 row in set.
abc@ubuntu:/usr/local/mysql/bin$ mysqlshow -uroot -p(密码) test a --count;
mysqlshow: Cannot get record count for db: test, table: a: Table 'test.a' doesn't exist
abc@ubuntu:~/Downloads$ more t2c.txt
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t2` (
`id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
INSERT INTO `t2` (`id`) VALUES (1),(3),(1),(3),(1),(2147483647),(3),(1),(2147483647),(3),(1),(2147483647),(3);
abc@ubuntu:~/Downloads$ mysqlshow
+--------------------+
| Databases |
+--------------------+
| information_schema |
| test |
+--------------------+
abc@ubuntu:~/Download |