Jump to content
malcek

SOLVED!SQL error when import database

Recommended Posts

Lately i get error when import backup from my live shop to my testing server.

 

Error

SQL query:

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
 

MySQL said: dot.gif

#1231 - Variable 'character_set_client' can't be set to the value of 'NULL' 

 

 

Prestashop version is 1.4.11

Can anybody explain me what this error means?

 

Best regards

 

Martin

Edited by malcek (see edit history)

Share this post


Link to post
Share on other sites

You should explain how you fixed it when you marked the topic as solved. I have the same error.

Share this post


Link to post
Share on other sites

Sorry I can't explain as I got expert help for that and they fix the problem. I never asked them.. :)

Share this post


Link to post
Share on other sites

After a more deep search, I read that uploading a large SQL dump file via phpMyAdmin could be de cause of the error because the transfert is interrupted due to the execution time and/or file size limitation. I splitted manually the SQL dump by exporting large tables one by one (1 table 1 file), I exported the smallest in one file. So the import of each file was done without interruption and it worked.

Share this post


Link to post
Share on other sites

Hello,

 

Yes, I know this is a old topic. But, Google liked this and given a good position. Also, there is no detailed solution. Actually, very easily. You should add the following sql codes at the beginning of the your sql file.

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=[spam-filter]CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=[spam-filter]CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=[spam-filter]COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=[spam-filter]TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=[spam-filter]UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=[spam-filter]FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=[spam-filter]SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=[spam-filter]SQL_NOTES, SQL_NOTES=0 */;

That's that!

Share this post


Link to post
Share on other sites

Hello,

 

Yes, I know this is a old topic. But, Google liked this and given a good position. Also, there is no detailed solution. Actually, very easily. You should add the following sql codes at the beginning of the your sql file.

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=[spam-filter]CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=[spam-filter]CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=[spam-filter]COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=[spam-filter]TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=[spam-filter]UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=[spam-filter]FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=[spam-filter]SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=[spam-filter]SQL_NOTES, SQL_NOTES=0 */;

That's that!

 

Hello SahinSOLMAZ!

 

That's great, but what sql file do you mention?

The file what we like to import or a file in the \xampp\mysql folder?

 

I know it is an old post, but this is the first from google :)

 

I fount this in my sql file at the end:

 

ALTER TABLE `zone`

  MODIFY `id_zone` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;

/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

 

Have I change It to your code?

Edited by szilaszlo (see edit history)

Share this post


Link to post
Share on other sites

Hello SahinSOLMAZ!

 

That's great, but what sql file do you mention?

...

..

I fount this in my sql file at the end:

 

Hello,

I don't understand exactly. ? You should add to your sql file. (at the beginning of the file.)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More