Try this:
mysql -u root -p --one-database destdbname < alldatabases.sql
In the above code substitute destdbname with the database name you want to restore, and alldatabases.sql with the name of your full DB backup.
If you would rather just extract the database dump of the single database from the --all-databases dump file, you can do this with sed using this command:
sed -n '/^-- Current Database: `dbname`/,/^-- Current Database: `/p' alldatabases.sql > output.sql
Where dbname is replaced with the database name of the database to extract, and alldatabases.sql is the name of your dump file. The result will be saved into the file output.sql.
I think I have a plausible explanation you find very intriguing.
When you loaded the MyISAM table, only one index got loaded into the .MYI
file in a lopsided manner.
Which index would that be ? THE PRIMARY KEY. Why ?
Indexes usually use BTREEs. They are designed to collect keys into a single BTREE node and balance the BTREE internally until the BTREE is full. On the insert into the full node, the full tree node is split and the keys inside are divided.
Most often a BTREE node will split is when you load the keys in order. For proof, look at the worst case BTREE --- the balanced binary tree.
I have several posts in the DBA STackExchange where I mention how a balanced binary only has node with one key. I also mention how a leaf pages must rebalance about 45% of the time when inserting a new key. Here are those posts:
My working theory is that random inserts into the table may actually make the .MYI
smaller by prevent tree node splits as much as possible.
In order to make this happen, you will have to something quite unusual. Ready for this ?
ALTER TABLE generic_dummy_table_name ORDER BY datetime;
or
ALTER TABLE generic_dummy_table_name ORDER BY user,datetime;
That right, you can reorder the physical rows of the table. This may make the indexes a different size by inducing BTREE splits on another index.
Try reordering the table. Then, mysqldump it and reload it. You may find that the .MYI
may get smaller or bigger. You cannot really predict it.
Next time, try reloading the MyISAM table with a very large bulk insert buffer.
Just run
SET GLOBAL bulk_insert_buffer_size = 1024 * 1024 * 1024;
then connect to mysql and reload the mysqldump.
GIVE IT A TRY !!!
Best Answer
It is unclear if the commercial version you mention is a trial or a purchased version of MySQL Enterprise. You should get Oracle credentials for download in the first case associated with your license.
In both cases, you have here a link to both the trial and licensed versions of MySQL Enterprise Edition (including Enterprise Backup):
https://www.mysql.com/trials/