I have Bluehost account and now i am transferring to new account digitalocean.com i am doing export and import as we do in the phpmyadmin but here when i import my sql.zip or sql.gz files in new server it show me error like
Error
Static analysis:
1 errors were found during analysis.
Missing expression. (near "ON" at position 25)
SQL query: Edit Edit
SET FOREIGN_KEY_CHECKS = ON;
MySQL said: Documentation
#2006 - MySQL server has gone away
Here is the screen shot
https://www.awesomescreenshot.com/image/2511553/fa78fad9e1108051c84538f2314df7
i do following steps to resolve issue
But no luck i think it is an issue with bluehost server when i am trying to export
After checking lots of solutions finally i found the correct one, my wordpress database size was 100mb.
Changing php.ini at C:\xampp\php\php.ini
max_execution_time = 600
max_input_time = 600
memory_limit = 1024M
post_max_size = 1024M
user_ini.cache_ttl = 15000
Changing my.ini at C:\xampp\mysql\bin\my.ini</b>
max_allowed_packet = 1024M
This Error, Mostly We get while importing the database from PhpMyAdmin. I solved it by importing database through commands.
mysql -u username -p database_name < file_name.sql
or by changing in database file_name.sql
as:
put this line SET FOREIGN_KEY_CHECKS = 0;
just the beginning of database file_name.sql
.
And put this line SET FOREIGN_KEY_CHECKS = 1;
just before the end of file at last line of file_name.sql
.
Note: The first line will disable foreign key checks and the last line will enable it again.
How to import an SQL file using the command line in MySQL?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With