ホスティングサービスVPSからPhpMyAdminを介してDrupal WebサイトのデータベースをFedora 23ワークステーションで動作するローカルコンピュータにエクスポートしました。私はローカルコンピュータ(PhpMyAdmin 4.5.5.1; 10.0.23-MariaDB)からVPS(PhpMyAdmin 4.0.10.7; 5.5.42-cll)にそれを戻してエクスポートしました。 は、次のエラーメッセージが表示されました:インポート時にphpmyadminエクスポートで構文エラーが発生するのはなぜですか?
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
たオリジナルのテーブル作成クエリ:
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.';
私はphpMyAdminには直接主キーを作成し、それ以降のテーブルを変更しないことを読んで(PhpMyAdmin export does not include PRIMARY KEY as mysqldump) 。しかし、エラーメッセージがの構文のエラーのため、問題には関係していないようです。