I'm trying to copy a database from a MariaDB server on another. I made a dump of the database on server A with :
sudo mysqldump -u root -p --databases database1 > /var/tmp/database1.sql
I created the new database on server B with :
create database database1;
Then I copied the .sql dump file from server A to server B with scp and imported it on server B with :
sudo mysql -u root -p database1 < database1.sql
However, the two databases seem to not have the same size :
Server A :
MariaDB [(none)]> SELECT table_schema "database1", ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB" FROM information_schema.tables GROUP BY table_schema;
+--------------------+---------------+
| database1 | DB Size in MB |
+--------------------+---------------+
| information_schema | 0.2 |
| mysql | 2.5 |
| performance_schema | 0.0 |
| database1 | 516.7 |
+--------------------+---------------+
Server B :
MariaDB [(none)]> SELECT table_schema "database1",ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB" FROM information_schema.tables GROUP BY table_schema;
+--------------------+---------------+
| database1 | DB Size in MB |
+--------------------+---------------+
| information_schema | 0.2 |
| mysql | 0.7 |
| performance_schema | 0.0 |
| database1 | 456.8 |
+--------------------+---------------+
Also, If I look at the same table on both database, they seem to not have the same number of lines. I've tried to copy the database multiple times but always get a difference. Is there something I'm missing ? I'm not an expert on MariaDB. Both server are under Debian 9.