Forums

Importing MySQL from ampps to PythonAnywhere Error

I have built an SQL database locally using ampps which uses MySQL 8.0.31. I then exported it using PHPMyAdmin and tried to import it into my PythonAnywhere database using:

use database$database; source database.sql;

but I keep getting errors such as the below whilst importing.

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(_utf8mb4'')
)' at line 8
ERROR 1146 (42S02): Table 'database$database.wagtailsearch_indexentry' doesn't exist

ERROR 1215 (HY000): Cannot add foreign key constraint

I checked the MySQL version on PythonAnywhere and it's:

mysql Ver 8.0.29-0ubuntu0.20.04.3 for Linux on x86_64 ((Ubuntu)

That would not work at the moment, as client library is MySQL 8 but server is still 5.7. MySQL 8 server should be available soon.

Is soon within the next month by any chance or no timeframe really?

Unless something goes wrong, within the next month. I've made a note to post here when it's ready.

Should MySQL 8 be expected within the next week?

@littlereborns Email us and we will migrate your database to MySQL8.

We are now able to migrate users to MySQL 8 on request. The migration takes a few minutes plus the time it takes for us to dump and reload your databases on the new server. So larger databases will take longer. Your database will not be available during the migration. You will need to be on either the glastonbury or the haggis system image (https://help.pythonanywhere.com/pages/ChangingSystemImage/), so please make sure that you are on one of those before making the request. Send a request to support@pythonanywhere.com with an indication of a time when it will be convenient for you (between 11am and 6pm UTC on a weekday).