New answers tagged

1

My guess is that you cant use limit in combination with --order-by-primary One way around this is to define the order by within the -where argument. If you know the primary key for the table: mysqldump -u lelle -p -w"1 = 1 order by <primary key> LIMIT 40" <database> <table> Note that <primary key> is a place holder for the columns ...


2

Not matter what you configure innodb_file_per_table to be (0 or 1), the following still occurs MySQL creates a database folder MySQL creates every table's .frm in a database folder EXAMPLE Your database directory (datadir) is /var/lib/mysql You run the following commands CREATE DATABASE IF NOT EXISTS mydb; USE mydb CREATE TABLE tb1 (a INT NOT NULL) ...


0

That special type of comment says "leave this as a comment if running a version older than 4.1.1; else execute it. utf8mb4 came in in 5.5.3, so the 'correct' version would be /*!50503 SET character_set_client = utf8mb4*/ If your version of mysqldump and mysql are newer than 5.5.3, no harm is done by leaving it 40101. If you do try to load it on a mysql ...


1

Sounds like the view is dumped before its base table(s). You should use information_schema.tables or other way to get only "real" tables, dump them first and then dump views. When you use mysqldump for everything, it handles that automatically.



Top 50 recent answers are included