First Import from cPanel Works... except Mysql

2 posts / 0 new
Last post
#1 Sun, 08/04/2019 - 10:12
Falcons34

First Import from cPanel Works... except Mysql

So as the title says, just did our first import from a cpanel backup account, and everything seems fine in terms of folders, files, even mysql user and database.

The problem, is only one table imported. So I manually exported and imported the database via phpMyAdmin, and i get a collation error. I manually fix the collation error, by editing the sql file changing utf8mb4_unicode_520_ci to utf8mb4_unicode_ci

Then attempt to import again, and it appears 5 tables imported, but now new errors.

2 errors were found during analysis.

Unexpected beginning of statement. (near "phpMyAdmin" at position 0) Unrecognized statement type. (near "SQL" at position 11) SQL query:

phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Aug 03, 2019 at 05:34 PM -- Server version: 5.7.27 -- PHP Version: 7.2.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"

MySQL said: Documentation

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'phpMyAdmin SQL Dump

-- version 4.8.5

-- https://www.phpmyadmin.net/

-- Host: ' at line 1

It's weird that the error references Line 1, but still allowed 6 tables to import. Thoughts anyone?

And going forward, how do i avoid these issues? I have a whole bunch of sites to migrate over. This is a Wordpress site

Thanks

Mon, 08/05/2019 - 10:49
Falcons34

Just an update, went into servers > Mysql area of Virtualmin, uploaded the database file and it worked :)