Is it possible to move a database from one cPanel account on one server to another account on the same server?
Trying to do this without having to recreate the users.
Trying to do this without having to recreate the users.
Yeah, I kinda figured I could do that... it just seemed kinda silly to me that I would destroy a database and its users to recreate it when essentially its already usable by the second account... (minus the fact that cpanel sees it as belonging to the first account.It is not possible to move the database from one cpanel account to another on the same server. You can try to take the backup of the database and manually create the database and database user on another account and restore the content of the database.
I don't think he meant to destroy the original database. :pYeah, I kinda figured I could do that... it just seemed kinda silly to me that I would destroy a database and its users to recreate it when essentially its already usable by the second account... (minus the fact that cpanel sees it as belonging to the first account.
See, problem is I don't have the original password for the database... Normally not a problem, but Drupal has the password in a url, using html friendly text to store the password with special characters...
You wouldn't happen to know how I can re-encode a new password so that I can just replace it in the settings file would you?
Of course I could always just use plaintext...
'mysql://user_name:[email protected]/drupal_database';
The answer to your question is... I have no idea... the way that the config file is setup is in that manner after the drupal installation is completed...I'm curious, why is the site using a URL to connect to a database on the same server?
Backing up and restoring an SQL file from the old database to the new one using a different name can be done in a few seconds via shell.
Well, I should have listened to you, you were right, officially cPanel said pretty much the same thing:It is not possible to move the database from one cpanel account to another on the same server. You can try to take the backup of the database and manually create the database and database user on another account and restore the content of the database.
Figured I'd post and share that since it has the official solution to my problem.There is now way to move a database from one cpanel account to another using cpanel except by creating a dump of the database and restoring it on the new account. You can do this with phpMyAdmin ro by using the mysqldump CLI.
An example of using mysqldump
mysqldump <databasename> > <databasename>.sql
or with a real name
mysqldump user_databse > user_database.sql
Then on the new cPanel account create the database and then restore the sql dump to that database by doing
mysql -D newuser_database < ./user_database.sql
That would restore the dump user_database.sql into database newuser_database