0

In transferring a site from one host to another while retaining the same domain name, copying WP files is straight-forward, not so with sql databases.

In a shared hosting environment, importing a database invariably gets a 1044 or 1045 access error because of the existence of one or two statements near the top of the dump such as:

CREATE DATABASE IF NOT EXISTS `some_db` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `some_db`;

Once they are commented out, the import of some_db proceeds without error, so how to get the above snippet back in to its place once in storage?

Plugins such as phpMyAdmin may offer functionality, any advice on how to use would help greatly.

1 Answer 1

0

It appears, at least in cPanel, the lines in question were not required in the export, with the unsurprising consequence of the other encapsulated sql statements defaulting to reference the current database only.

Turns out to be convenient when more than one database is configured, so long as there are no statements that select objects from other databases (untested).

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.