0

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 MySQL version is: 5.5.52-log
  • The MariaDB version is: 10.1.21-MariaDB-1~trusty

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;
4
  • show top 20 lines of your file. Which MySQL Version you have use to create the dump Commented Mar 16, 2017 at 15:02
  • see lines above Commented Mar 16, 2017 at 15:06
  • Let's see the 1064 from running the code, not from the docs. Commented Mar 18, 2017 at 3:26
  • I could solve it, see my answer below Commented Mar 18, 2017 at 9:07

2 Answers 2

1

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

Sign up to request clarification or add additional context in comments.

8 Comments

Is it only this? Is there a way to remove these lines on the export?
linux? use this : $ grep -v "^--- " orgdump.sql >newdump.sql will remove all lines starting with "--- "
I exported without comments but the errors are still there
can you refresh the top lines of your dumpfile.
this looks god and also works on my server. if there are no secrets in it you can zip it and send it me by email and i will fix it for you
|
0

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!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.