I tried to migrate the database of existing application from MySQL 5.6 to MySQL 8.0
I have created the backup .sql file from old engine and deplayed it to new 8.0 server - I received no errors , no warnings - process finished successfully.
BUT - my database size was 62 MB in MySQL 5.6 and when I moved it to MySQL 8.0 size changed to 56 MB. I have tried to check which tables where different and noticed that in some tabled the number of rows decreased.
Can anyone tell me why such strange thing happend? Why database size and row number decreased- even throw the process finished without errors and warnings.
Are there some important thinks that I need to know in migration process - that will allow me not to loose any data?
Make sure you have few things listed out.
1) Total number of tables in 5.6
2) highest rows tables.
First try to restore dump in same 5.6 version, double check above information.
decreasing size in few MB's is very common because of compression and restoration is different at another server.
All you need to make sure total number of rows should not decreased.
Related
I am currently prepping to upgrade from MySQL 5.7 to MySQL 8.
I am using RDS on AWS with a master server and read replicas. The read replicas use MySQL replication but are read-only copies.
One of the issues I need to resolve prior to upgrade is that I have some tables on production databases with COMPACT row format which need updating to DYNAMIC.
I know I can do this with the following and have a script which will find and update all tables needed.
ALTER TABLE `tablename` ROW_FORMAT=DYNAMIC;
There are a large number of potentially large tables (millions of rows) that need updating.
What does this change actually do in the background? Is it safe to run this on a production server whilst it is in use? Does it lock the tables whilst it makes the change?
I have run a test on a restored copy of the server. This takes a while as I'd expect, and as such it's hard for me to test to be sure everything is working fine during this whole process. It does complete successfully eventually though
Is there any issue about MySQL that it takes so many seconds to drop even an empty table.
MySQL version: 8.0.23 for Linux on x86_64 (MySQL Community Server - GPL)
Some info:
I'm running Postgres at the same machine (local dev). I have stopped Postgres already but nothing.
I realized about the issue when testing a Ruby on Rails application. The database have several tables and, for each table, it takes an average of 7 seconds to truncate each one.
So I went to MySQL client and could see that, in fact, it really takes a bunch of seconds to get a single table truncated.
Is that a problem of having Postgres and MySQL installed at the same machine?
I didn't find anything useful to solve the issue.
I have MySQL database which is in size of 4 TB and when I'm dumping it using mysqldump then it is taking around 2 days to dump that database in the .sql format
Can anyone help to faster this process?
OS ubuntu 14
MySQL 5.6
The single database of size 4 TB
hundreds of table average tables size is around 100 to 200 GB
Please help if anyone have any solution to this
I would:
stop the database,
copy the files in a new database
restart the database
process the data from the new place (maybe in an other machine).
If you are replicating, just stop replication, process, start replication.
These methods should improve speed, because of lack of concurrent processes that access the database (and all lock logic).
On such large databases, I would try not to have to make dumps. Just use mysql table files if possible.
In any case 2 days seems a lot, also for a old machine. Check that you are not swapping, and try to check your mysql configuration for possible problems. In general, try to get a better machine. Computer are cheaper than time to optimize.
i will really appreciate if someone help me with this.
I have spend like 8hours googling around and found no solution to problem.
I have MySQL server version 5.7.7 on Windows server 2008 R2
Table engine is innodb
innodb_file_per_table = 1
I get error "Table is full" when table reaches 4Gb.
MySQL documentation sais that there is actualy only one limit on table size, filesystem.
(http://dev.mysql.com/doc/refman/5.7/en/table-size-limit.html)
HDD where are data stored uses NTFS, just to be sure i created 5Gb file without problems. And sure there is more than 10Gb of free space.
I understand setting "innodb_data_file_path" is irrelevant if "innodb_file_per_table" is enabled, but i tried to set it. No differences.
I have tried to do clean install of mysql. Same result.
EDIT
Guy that installed MySQL server before me accidentally installed 32bit version. Migration to 64bit mysql solved that problem
About the only way for 4GB to be a file limit is if you have a 32-bit version of MySQL. Also check for 32-bit Operating system. (Moved from comment, where it was verified.)
i am also not sure but read this it may help you.
http://jeremy.zawodny.com/blog/archives/000796.html
one more thing one guy had same problem.he had made changes to
NNODB settings for the innodb_log_file_size and innodb_log_buffer_size!changes were :
1) shutdown mysql
2) cd /var/lib/mysql
3) mkdir oldIblog
4) mv ib_logfile* oldIblog
5) edit /etc/my.cnf find the line innodb_log_file_size= and increase it to an appropriate value (he went to 1000MB as he was dealing with a very large dataset... 250million rows in one table). If you are not sure I suggest doubling the number every time you get a table is full error. he set innodb_log_buffer_size to 1/4 of the size of his log file and the problems went away.
I didnt find solution to this, i have no idea why mysql is unable to create more than 4Gb table.
As a workaround i moved only this table back to ibdata by setting "innodb_file_per_table" back to 0 and recreated that table.
Interesting is that even ibdata1 reported table is full when it reached 4Gb, even without setting max and enabled autoexpand.
So i created ibdata2 and let it autoexpand, now i am able to write new data to that table.
I have the table with about 30 columns, and then I add one column to that table. In mysql 5.6.12 this operation takes about 0.7 seconds, when in mysql 5.0.51 it takes more more smaller.
The whole database takes about 2.7 Mb. We ues InnoDb. All settings are default.
Could anyone tell me why in mysql 5.6.12 altering queries are executed so slowly? Is there any tweak related to this? Maybe is there any known bug related to this issue?
any help would be appreciated!
Please check following points
How many rows are there in table ?
Is there any default assignment being done when a new column is getting added ?
Check space available in data directory of mysql-5.6 and compare it to mysql-5.5 installation 'data' directory.
Check steps which were followed to migrate/upgrade from mysql-5.5 to mysql-5.6 ? May be something was wrong there.