MySQL Import Errors on New Host & New Domain
-
I have an old site which was backed up via MySQL export and FTP download.
The original domain (let’s call it olddomain.com) is no longer available nor owned by me; so, the typical wordpress migration instructions will not work.
I’ve uploaded the files via FTP.
Created a new database.
Updated config.php with the new database connection info.and this is where I fail:
Upon Importing the MySQL to the new database I get the following errors. I’m assuming the first one is typical as it’s a NewDatabase name and the OldDatabase name can never be had as it would require using the old host.
Error SQL query: -- -- Database: <code>OldDatabaseName</code> -- CREATE DATABASE IF NOT EXISTS <code>OldDatabaseName</code> DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci MySQL said: Documentation #1044 - Access denied for user 'MyName'@'NUM.NUM.%' to database 'OldDatabaseName'
Warning in ./libraries/classes/Dbi/DbiMysqli.php#213 mysqli_query(): MySQL server has gone away Backtrace ./libraries/classes/Dbi/DbiMysqli.php#213: mysqli_query( , string 'SELECT <code>SCHEMA_NAME</code> FROM <code>INFORMATION_SCHEMA</code>.<code>SCHEMATA</code>, (SELECT DB_first_level FROM ( SELECT DISTINCT SUBSTRING_INDEX(SCHEMA_NAME, \'_\', 1) DB_first_level FROM INFORMATION_SCHEMA.SCHEMATA WHERE TRUE ) t ORDER BY DB_first_level ASC LIMIT 0, 100) t2 WHERE TRUE AND 1 = LOCATE(CONCAT(DB_first_level, \'_\'), CONCAT(SCHEMA_NAME, \'_\')) ORDER BY SCHEMA_NAME ASC', integer 0, ) ./libraries/classes/DatabaseInterface.php#319: PhpMyAdmin\Dbi\DbiMysqli->realQuery( string 'SELECT <code>SCHEMA_NAME</code> FROM <code>INFORMATION_SCHEMA</code>.<code>SCHEMATA</code>, (SELECT DB_first_level FROM ( SELECT DISTINCT SUBSTRING_INDEX(SCHEMA_NAME, \'_\', 1) DB_first_level FROM INFORMATION_SCHEMA.SCHEMATA WHERE TRUE ) t ORDER BY DB_first_level ASC LIMIT 0, 100) t2 WHERE TRUE AND 1 = LOCATE(CONCAT(DB_first_level, \'_\'), CONCAT(SCHEMA_NAME, \'_\')) ORDER BY SCHEMA_NAME ASC', , integer 0, ) ./libraries/classes/DatabaseInterface.php#1782: PhpMyAdmin\DatabaseInterface->tryQuery( string 'SELECT <code>SCHEMA_NAME</code> FROM <code>INFORMATION_SCHEMA</code>.<code>SCHEMATA</code>, (SELECT DB_first_level FROM ( SELECT DISTINCT SUBSTRING_INDEX(SCHEMA_NAME, \'_\', 1) DB_first_level FROM INFORMATION_SCHEMA.SCHEMATA WHERE TRUE ) t ORDER BY DB_first_level ASC LIMIT 0, 100) t2 WHERE TRUE AND 1 = LOCATE(CONCAT(DB_first_level, \'_\'), CONCAT(SCHEMA_NAME, \'_\')) ORDER BY SCHEMA_NAME ASC', integer 256, integer 0, boolean false, ) ./libraries/classes/Navigation/Nodes/Node.php#459: PhpMyAdmin\DatabaseInterface->fetchResult(string 'SELECT <code>SCHEMA_NAME</code> FROM <code>INFORMATION_SCHEMA</code>.<code>SCHEMATA</code>, (SELECT DB_first_level FROM ( SELECT DISTINCT SUBSTRING_INDEX(SCHEMA_NAME, \'_\', 1) DB_first_level FROM INFORMATION_SCHEMA.SCHEMATA WHERE TRUE ) t ORDER BY DB_first_level ASC LIMIT 0, 100) t2 WHERE TRUE AND 1 = LOCATE(CONCAT(DB_first_level, \'_\'), CONCAT(SCHEMA_NAME, \'_\')) ORDER BY SCHEMA_NAME ASC') ./libraries/classes/Navigation/NavigationTree.php#290: PhpMyAdmin\Navigation\Nodes\Node->getData( string 'databases', string '0', string '', ) ./libraries/classes/Navigation/NavigationTree.php#849: PhpMyAdmin\Navigation\NavigationTree->_buildPath() ./libraries/classes/Navigation/Navigation.php#59: PhpMyAdmin\Navigation\NavigationTree->renderState() ./libraries/classes/Header.php#440: PhpMyAdmin\Navigation\Navigation->getDisplay() ./libraries/classes/Response.php#266: PhpMyAdmin\Header->getDisplay() ./libraries/classes/Response.php#279: PhpMyAdmin\Response->_getDisplay() ./libraries/classes/Response.php#438: PhpMyAdmin\Response->_htmlResponse() PhpMyAdmin\Response->response()
Warning in ./libraries/classes/Dbi/DbiMysqli.php#213 mysqli_query(): Error reading result set's header Backtrace ./libraries/classes/Dbi/DbiMysqli.php#213: mysqli_query( , string 'SELECT <code>SCHEMA_NAME</code> FROM <code>INFORMATION_SCHEMA</code>.<code>SCHEMATA</code>, (SELECT DB_first_level FROM ( SELECT DISTINCT SUBSTRING_INDEX(SCHEMA_NAME, \'_\', 1) DB_first_level FROM INFORMATION_SCHEMA.SCHEMATA WHERE TRUE ) t ORDER BY DB_first_level ASC LIMIT 0, 100) t2 WHERE TRUE AND 1 = LOCATE(CONCAT(DB_first_level, \'_\'), CONCAT(SCHEMA_NAME, \'_\')) ORDER BY SCHEMA_NAME ASC', integer 0, ) ./libraries/classes/DatabaseInterface.php#319: PhpMyAdmin\Dbi\DbiMysqli->realQuery( string 'SELECT <code>SCHEMA_NAME</code> FROM <code>INFORMATION_SCHEMA</code>.<code>SCHEMATA</code>, (SELECT DB_first_level FROM ( SELECT DISTINCT SUBSTRING_INDEX(SCHEMA_NAME, \'_\', 1) DB_first_level FROM INFORMATION_SCHEMA.SCHEMATA WHERE TRUE ) t ORDER BY DB_first_level ASC LIMIT 0, 100) t2 WHERE TRUE AND 1 = LOCATE(CONCAT(DB_first_level, \'_\'), CONCAT(SCHEMA_NAME, \'_\')) ORDER BY SCHEMA_NAME ASC', , integer 0, ) ./libraries/classes/DatabaseInterface.php#1782: PhpMyAdmin\DatabaseInterface->tryQuery( string 'SELECT <code>SCHEMA_NAME</code> FROM <code>INFORMATION_SCHEMA</code>.<code>SCHEMATA</code>, (SELECT DB_first_level FROM ( SELECT DISTINCT SUBSTRING_INDEX(SCHEMA_NAME, \'_\', 1) DB_first_level FROM INFORMATION_SCHEMA.SCHEMATA WHERE TRUE ) t ORDER BY DB_first_level ASC LIMIT 0, 100) t2 WHERE TRUE AND 1 = LOCATE(CONCAT(DB_first_level, \'_\'), CONCAT(SCHEMA_NAME, \'_\')) ORDER BY SCHEMA_NAME ASC', integer 256, integer 0, boolean false, ) ./libraries/classes/Navigation/Nodes/Node.php#459: PhpMyAdmin\DatabaseInterface->fetchResult(string 'SELECT <code>SCHEMA_NAME</code> FROM <code>INFORMATION_SCHEMA</code>.<code>SCHEMATA</code>, (SELECT DB_first_level FROM ( SELECT DISTINCT SUBSTRING_INDEX(SCHEMA_NAME, \'_\', 1) DB_first_level FROM INFORMATION_SCHEMA.SCHEMATA WHERE TRUE ) t ORDER BY DB_first_level ASC LIMIT 0, 100) t2 WHERE TRUE AND 1 = LOCATE(CONCAT(DB_first_level, \'_\'), CONCAT(SCHEMA_NAME, \'_\')) ORDER BY SCHEMA_NAME ASC') ./libraries/classes/Navigation/NavigationTree.php#290: PhpMyAdmin\Navigation\Nodes\Node->getData( string 'databases', string '0', string '', ) ./libraries/classes/Navigation/NavigationTree.php#849: PhpMyAdmin\Navigation\NavigationTree->_buildPath() ./libraries/classes/Navigation/Navigation.php#59: PhpMyAdmin\Navigation\NavigationTree->renderState() ./libraries/classes/Header.php#440: PhpMyAdmin\Navigation\Navigation->getDisplay() ./libraries/classes/Response.php#266: PhpMyAdmin\Header->getDisplay() ./libraries/classes/Response.php#279: PhpMyAdmin\Response->_getDisplay() ./libraries/classes/Response.php#438: PhpMyAdmin\Response->_htmlResponse() PhpMyAdmin\Response->response()
So… What should I do now?
Can I ever get this old site back online?
I clicked the “Ignore all” button and it’s left me with just the first error visible.
The next step in my instructions is to go in and edit the options table with the new domain to get the database and site files connected again — but I don’t want to do that until I know the MySQL import was successful otherwise I’d be continuing with a broken database.
Does anyone who knows MySQL know if it’s safe to proceed with the domain update in the database tables?
- The topic ‘MySQL Import Errors on New Host & New Domain’ is closed to new replies.