There was a problem importing from MySQL 5.7.15 to version 5.5.52. I made a project based on Django 1.10.2 on my working computer, and when it came to transferring the database to the combat server, an error falls out.
Console Error:
ERROR 1064 (42000) at line 105: 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 '(6) DEFAULT NULL, `is_superuser` tinyint(1) NOT NULL, `username` varchar(150' at line 4 Error in phpMyAdmin:
Ошибка SQL-запрос: CREATE TABLE `auth_user` ( `id` INT( 11 ) NOT NULL AUTO_INCREMENT , `password` VARCHAR( 128 ) NOT NULL , `last_login` DATETIME( 6 ) DEFAULT NULL , `is_superuser` TINYINT( 1 ) NOT NULL , `username` VARCHAR( 150 ) NOT NULL , `first_name` VARCHAR( 30 ) NOT NULL , `last_name` VARCHAR( 30 ) NOT NULL , `email` VARCHAR( 254 ) NOT NULL , `is_staff` TINYINT( 1 ) NOT NULL , `is_active` TINYINT( 1 ) NOT NULL , `date_joined` DATETIME( 6 ) NOT NULL , PRIMARY KEY ( `id` ) , UNIQUE KEY `username` ( `username` ) ) ENGINE = INNODB AUTO_INCREMENT =2 DEFAULT CHARSET = utf8; Ответ MySQL: Документация #1064 - 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 '(6) DEFAULT NULL, `is_superuser` tinyint(1) NOT NULL, `username` varchar(150' at line 4 On my computer installed:
mysql Ver 14.14 Distrib 5.7.15, for Linux (x86_64) using EditLine wrapper Distributor ID: Ubuntu Description: Ubuntu 16.04.1 LTS Release: 16.04 Codename: xenial on server:
mysql Ver 14.14 Distrib 5.5.52, for debian-linux-gnu (x86_64) using readline 6.3 Distributor ID: Ubuntu Description: Ubuntu 14.04.5 LTS Release: 14.04 Codename: trusty UTF8 backup file encoding, database encoding utf8_general_ci, InnoDB engine / type. I tried to play with encodings, upload via console, phpMyAdmin, MySQL Workbench and other compatibility modes, in general nothing good came of it. Of course, when the database is small, then you can create an empty database on the server and manually transfer the data. But when, for example, an online store then it does not go to the server from a newer version of MySQL to the old one. Who faced and who has solutions how to cope with this problem, unsubscribe, maybe it is simple, but something doesn’t reach or I don’t notice something that is obvious rather because of my lack of experience. For earlier thanks for any help.
last_login DATETIME,in this linelast_login DATETIME,- Mike