Jump to content

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)
Link to comment
Share on other sites

  • 1 year later...

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.

Link to comment
Share on other sites

  • 1 year later...

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!

Link to comment
Share on other sites

  • 6 months later...
  • 4 weeks later...

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)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...