Cray
Cray

Reputation: 5483

WordPress: Import MySQL database to MariaDB

I want to import a MySQL dump (export from phpMyAdmin) on a new server with phpMyAdmin. The new server runs on MariaDB and the import skips everytime with an error message.

The error message is #1064. From the docs:

Error: 1064 SQLSTATE: 42000 (ER_PARSE_ERROR)
Message: %s near '%s' at line %d

There are also a lot of notices about "Uninitialized string offsets".

Any ideas?

First 20 lines:

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;


CREATE TABLE IF NOT EXISTS `wp_commentmeta` (
`meta_id` bigint(20) unsigned NOT NULL,
  `comment_id` bigint(20) unsigned NOT NULL DEFAULT '0',
  `meta_key` varchar(255) DEFAULT NULL,
  `meta_value` longtext
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Upvotes: 0

Views: 1595

Answers (2)

Cray
Cray

Reputation: 5483

I could solve it by deleting the comments and the following line:

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

Thanks Bernd Buffen for the hints!

Upvotes: 0

Bernd Buffen
Bernd Buffen

Reputation: 15057

It a little work. Remove all BAckticks in the Comments like this:

from

--
-- Dumping data for table `yourTable` 
--

to

--
-- Dumping data for table yourTable 
--

or remove the lines

Upvotes: 1

Related Questions