Reputation: 11
I exported a Drupal website's database through PhpMyAdmin from my hosting service VPS to my local computer, which works with Fedora 23 workstation. I made a few modifications (through Drupal, not directly on the database) then exported it back from my local computer (PhpMyAdmin 4.5.5.1; 10.0.23-MariaDB) to the VPS (PhpMyAdmin 4.0.10.7; 5.5.42-cll) and got the following error message:
Requête SQL:
--
-- Base de données : `achlaltn_monhuv`
--
-- --------------------------------------------------------
--
-- Structure de la table `actions`
--
CREATE TABLE IF NOT EXISTS `actions` (
`aid` varchar( 255 ) NOT NULL DEFAULT '0' COMMENT
);
MySQL a répondu: Documentation
#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 ')' at line 13
The original table creation query was:
CREATE TABLE IF NOT EXISTS `actions` (
`aid` varchar(255) NOT NULL DEFAULT '0' COMMENT 'Primary Key: Unique actions ID.',
`type` varchar(32) NOT NULL DEFAULT '' COMMENT 'The object that that action acts on (node, user, comment, system or custom types.)',
`callback` varchar(255) NOT NULL DEFAULT '' COMMENT 'The callback function that executes when the action runs.',
`parameters` longblob NOT NULL COMMENT 'Parameters to be passed to the callback function.',
`label` varchar(255) NOT NULL DEFAULT '0' COMMENT 'Label of the action.',
PRIMARY KEY (`aid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores action information.';
I read that PhpMyAdmin doesn't create the primary key directly, but alter the table later ( PhpMyAdmin export does not include PRIMARY KEY as mysqldump ). But it seems not related to the problem, because the error message is of a syntax error.
Any idea?
Upvotes: 1
Views: 1180
Reputation: 12462
This appears to be related to a recent bug in phpMyAdmin that's been fixed for the current version, 4.6.0. The bug resulted in some problems with importing and exporting tables with comments, and although I haven't seen the exact problem you're seeing chances are very good it was fixed in the current version. I suggest you upgrade from 4.5.5.1 to 4.6.0 and try again.
Fundamentally, the import problem is the COMMENT
statement without an actual comment following, but you're missing the remainder of the table structure so first try upgrading and see if that fixes the problem.
Upvotes: 0