townsbg wrote:As follows:
- Code: Select all
C:\xampp>c:/xampp/mysql/bin/mysql.exe -u <Username> -p<Password> mywiki <Wiki_Database.sql
And I received the following error:
ERROR 2006 (HY000) at line 527: MySQL server has gone away
Is that because of the 2mb limit? Did I get the syntax right?
I hope you did repcale <Username> and <Password> with your true credentials, and did not enclose them in the <> brackets...
That is not because of the 2MB limit. The 2MB limit is a limitation of the php configuration. phpmyadmin is written in php so it is affected by php configirations.
The MySQL CLI is only affected by mysql configurations. There are of course still limitations that can produce such behavior.
In your case it can be true that your import contains very very huge sql statements that exceeded the limit for max_allowed_packet. So it might help to increase this limit for the server in your my.ini file and for the client as command parameter --max_allowed_packet. Maximum value for this parameter is 1G which means 1 Gigabyte.
So for your mysql statement it should be append to
- Code: Select all
c:/xampp/mysql/bin/mysql.exe --max_allowed_packet=1G -u <Username> -p<Password> mywiki <Wiki_Database.sql
But don't forget to change this value for the server component in the \xampp\mysql\bin\my.ini file in the [mysqld] section too and restart your mysql server after that.
townsbg wrote:Do I need to update xampp? If so how?
How should we answer that? We have no information about your current environment, not even which XAMPP version you are using. We don't know your import file, or your current configuration.
In general: only update if you have a specific issue you already know that an update will solve that or if you have no other options.