0
votes

I'm having difficulties migrating a database (~3gb sql file) from MySQL 5.6 to MySQL 5.7 on Google Cloud SQL.

First I made a dbdump of the MySQL 5.6 server database:

mysqldump -hxx.xx.xx.xx -uroot -pxxxx dbname --opt --hex-blob --default-character-set=utf8 --no-autocommit > dbname.sql

I then tried to import the database with cloudsql-import:

.go/bin/cloudsql-import --dump=dbname.sql --dsn='root:password@tcp(xx.xx.xx.xx:3306)/dbname'

The import starts but after a while (around 10 minutes) I receive the following error message:

2016/06/29 13:55:48 dial tcp xx.xx.xx.xx:3306: getsockopt: connection refused

Any further connection attempts to the MySQL server are denied with the following error message:

ERROR 2003 (HY000): Can't connect to MySQL server on 'xx.xx.xx.xx' (111)

Only a full restart (made from the google cloud platform console) makes it possible to connect to again.

I made a full migration from 5.5 to 5.6 using this method not so long ago. Any ideas why this doesn't work with 5.7?

2

2 Answers

0
votes

would you check the storage disk usage on the Console Overview page of the instance? If the storage is full, you can increase the storage size of your instance by changing the storage size value in Edit page.

If the binary logging is enabled, lots of space will be taken by binary logs. You could consider to turn it off when you are running the import.

If you still have trouble with the instance, you can send an email to [email protected] for further investigation. Thanks.

0
votes

I tried analyzing the different rows where the import had timed out, but didn't find anything out of the ordinary. I then fiddled with the available parameters in Google cloud SQL and when using mysqldump.

I finally just tried using a better Machine Type (from two core 8GB Ram to 8 core 30GB ram) and it "solved" the problem.