trying to rebuild form backup but database names are different -Help!

Started by pwarnaby, July 31, 2012, 12:43:54 PM

Previous topic - Next topic

pwarnaby

i have had a forum running here www.256clan.co.uk/forum [nofollow] for a couple of years , this was hosted by justhost. When there renewal came through at £280 i decided to get a new hosting with 123reg. I backed up my old forum , installed the new one and tried to import the backup file. I was then read the instructions! it seems teh new database has to have the same name as the old database. Seemed simple enough until i realised that 123reg wont allow me to create a new database with teh required name it will only generate database names.

So it appears im stuck with a backup with one database name and no way of creating a new database of teh same name.

Any ideas on how i can get out of this one ?

all help appreciated

Orangine

It doesn't. Just create a new database with new hosting and import content of the old one either using phpMyAdmin or similar (not recommended) or with a tool like BigDump(recommended), and then use repair_settings.php and provide new database details.

pwarnaby

thanks for that ill try again, dont think it allowed me to finish the import though when i used phpmyadmin but ill try again

pwarnaby

I get this error when trying to import the database in

Error

SQL query:

-- ==========================================================
--
-- Database dump of tables in `clancou1_clancou1`
-- July 31, 2012, 10:16:46 AM
--
-- ==========================================================
--
-- Table structure for table `smf_admin_info_files`
--
DROP TABLE IF EXISTS `smf_admin_info_files` ;

MySQL said: Documentation
#1046 - No database selected

Orangine

have you created a database on your new server? if so, add the following line as the first line of the .sql dump file:
USE databasename;

pwarnaby

yes i have created a database on new server.

ok a little out of my depth , how do i open a .sql dump file ? access ?

Gary

Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

cicka

Quote from: pwarnaby on July 31, 2012, 12:43:54 PM
I was then read the instructions! it seems teh new database has to have the same name as the old database.


You do not need to have the same name for the database. You can create a new database with whatever name you like and then make sure to update the info for the database at the settings.php file.

pwarnaby

thanks gary

just trying to unzip the dump file first , its used gzip and cant locate gunzip

pwarnaby

ok that seems to have worked thanks for your advice , it didnt actually tell me it uploaded and i cant see any posts in teh forum yet but it feels liek im moving forward

thanks again for you help

pwarnaby

i take it all back , that didnt work , during upload it kicked me out of the database to the login screen fooling me into thinking it was working ok.

Any advice welcome !

i have export the database to see whats in there and there is no post data ect.

pwarnaby

im now getting this

Error

SQL query:

-- ==========================================================
--
-- Database dump of tables in `clancou1_clancou1`
-- July 31, 2012, 12:54:14 PM
--
-- ==========================================================
--
-- Table structure for table `smf_admin_info_files`
--
USE databasename;

MySQL said: Documentation
#1044 - Access denied for user 'u256cla_777035_1'@'%' to database 'databasename'

cicka

Quote from: pwarnaby on July 31, 2012, 02:54:28 PM
im now getting this

Error

SQL query:

-- ==========================================================
--
-- Database dump of tables in `clancou1_clancou1`
-- July 31, 2012, 12:54:14 PM
--
-- ==========================================================
--
-- Table structure for table `smf_admin_info_files`
--
USE databasename;

MySQL said: Documentation
#1044 - Access denied for user 'u256cla_777035_1'@'%' to database 'databasename'

When you created the database, did you give the database user full access/permissions to the database?

pwarnaby

The host runs a script that installs the database for me and intalls an smf instance, i believe
they are very restrictive on access ect. I will have another look tonight at the access and see if they allow full permission settings.

Feels a bit like i may have selected the wrong hosting service but you live and learn i guess.

Again thanks four the advice.


Advertisement: