1

Topic: import old database to fresh install, or: goin' nuts.

Changed hosts.

Have a good backup of the database. Want to start with a fresh install of punbb and start fresh (old forums hacked into wordpress badly).

Create new empty sql database on new host with user and pass matching backed up database.

Import backed up database to new host via phpadmin.

Install punbb - punbb install tells me that I must create a php prefix and install an additional forum inside the uploaded backed up database. Wont let me install using the old populated database.

Just for giggles, install anyways, sure enough, nice new forum using the old database, but nothing there, blank.

I do not want this, I want to the fresh install to use the migrated database.

What am I doing wrong? Pullin' my hair out. smile

Thank you very much!

Re: import old database to fresh install, or: goin' nuts.

Install isn't going to "detect" an old database: its purpose is to install a new copy. Edit the config.php you have so that the details match your old install (I think from your description you just need to change the db_prefix)

3

Re: import old database to fresh install, or: goin' nuts.

I figured the problem was something like that, but was unsure exactly what.

I'll try again - during the install when punbb tells me that there are already forums in the database I want to  use, it won't let me proceed unless I specify another php prefix - so i should specify, install additional forums to the database, then change the prefix in the config to use the old db?

Sorry if I'm being dense.

Thanks a lot for the help.

4

Re: import old database to fresh install, or: goin' nuts.

also, off topic:

If I install the forntpage mod  package, I'm assuming my db will come over to it okay?

Re: import old database to fresh install, or: goin' nuts.

you dont need to run the install file at all if you have the old database. just upload it via phpmyadmin and edit the config file to your database info.

6

Re: import old database to fresh install, or: goin' nuts.

Cripes. I guess that's pretty elementary. I was stuck in a paradigm, new = install.


Thanks.

7 (edited by willray 2007-01-24 03:40)

Re: import old database to fresh install, or: goin' nuts.

Hello. I am working with a similar scenario and was hoping I could tag along on this?

Is there a step by step/FAQ posting somewhere which could assist and instruct me in how to go about going from one server to another, transferring the database via phpadmin?

IF not, is it correct that: I must first export the database from old server to my computer, then import those files from my computer to new server? And, that once the old database has been imported to the new server, the config.php file can then be changed according to the new server's info and populated database will be found on the new server?

I've been trying with phpadmin but keep getting the following errors: import.php: Missing parameter: import_type
import.php: Missing parameter:

I just don't know enough about all the programming side of things, and think I've just been going about it all wrong, probably. THANKS!

Will

Re: import old database to fresh install, or: goin' nuts.

that sounds about right, but i cant help with that error, not seen that before.....

did u export it correctly?

Re: import old database to fresh install, or: goin' nuts.

willray: Do you have SSH access either with your old host or with your new host?

Re: import old database to fresh install, or: goin' nuts.

not sure. will check.

11 (edited by willray 2007-01-24 16:15)

Re: import old database to fresh install, or: goin' nuts.

old server does use ssh. but new server does not for shared hosting, they only allow virtual dedicated and dedicated.

Re: import old database to fresh install, or: goin' nuts.

OK, use mysqldump to get the database from the old server

Re: import old database to fresh install, or: goin' nuts.

the error exactly, is as follows:


import.php: Missing parameter: import_type (FAQ 2.8)
import.php: Missing parameter: what (FAQ 2.8)

14 (edited by willray 2007-01-24 16:54)

Re: import old database to fresh install, or: goin' nuts.

Smartys wrote:

OK, use mysqldump to get the database from the old server

ok-- I've downloaded the mysqldump php file. I've uploaded this via FTP to old server and then run it. pulled up page w/MySQL connection parameters. Is this correct so far?

Re: import old database to fresh install, or: goin' nuts.

mysqldump generates an SQL dump of the database (it's a binary that comes with MySQL, not a PHP file). Download the database dump from the old server and upload it to the new server

Re: import old database to fresh install, or: goin' nuts.

OK! I've run the dump and have uploaded to new server. THANKS for the walking me through steps. Really appreciate it.

How to turn this file into a database recognized on new server? phpMyAdmin again, import from new server?

Re: import old database to fresh install, or: goin' nuts.

Use phpMyAdmin, yeah

Re: import old database to fresh install, or: goin' nuts.

Reading some instructions online, it is stated that I should first create a database and then import the  exported database into it via unzipping. When I'm in phpmyadmin it asks for number of fields in order to create new database.

are these steps accurate? if so, how many fields? THANKS.

WILL

Re: import old database to fresh install, or: goin' nuts.

A database doesn't have fields: a table does. Make sure you're creating a database, not a table within an existing database.

Re: import old database to fresh install, or: goin' nuts.

OK. The database is created, not the table. I have both myphpadmin exported and mysqldump copies of the database on my new server. You're saying I should be able to use phpmyadmin to import the backup database and it will load itself? But then, how do I change the config.php file as you noted earlier?

Re: import old database to fresh install, or: goin' nuts.

I suck so bad. Keep getting this error:


Error

SQL query:

CREATE TABLE `bans` (
`id` int( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
`username` varchar( 200 ) default NULL ,
`ip` varchar( 255 ) default NULL ,
`email` varchar( 50 ) default NULL ,
`message` varchar( 255 ) default NULL ,
`expire` int( 10 ) unsigned default NULL ,
PRIMARY KEY ( `id` )
) ENGINE = MYISAM DEFAULT CHARSET = latin1;

MySQL said: Documentation
#1064 - You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARSET=latin1' at line 9

Re: import old database to fresh install, or: goin' nuts.

CREATE TABLE `bans` (
`id` int( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
`username` varchar( 200 ) default NULL ,
`ip` varchar( 255 ) default NULL ,
`email` varchar( 50 ) default NULL ,
`message` varchar( 255 ) default NULL ,
`expire` int( 10 ) unsigned default NULL ,
PRIMARY KEY ( `id` )
) ENGINE = MYISAM;

23 (edited by willray 2007-01-27 01:19)

Re: import old database to fresh install, or: goin' nuts.

Thanks!

Hate to admit this but I'm so inexperienced (but wanting/willing to learn) in all this that I don't even know how to use this code ---- For instance, how do I go about putting this where it needs to go? How to change this SQL syntax? Much appreciation for all the help.

Re: import old database to fresh install, or: goin' nuts.

Paste it in the SQL tab in phpMyAdmin wink

25 (edited by willray 2007-01-27 17:02)

Re: import old database to fresh install, or: goin' nuts.

pasted it in the SQL tab in phpMyAdmin but got this:

Error

SQL query:

CREATE TABLE `bans` (
`id` int( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
`username` varchar( 200 ) default NULL ,
`ip` varchar( 255 ) default NULL ,
`email` varchar( 50 ) default NULL ,
`message` varchar( 255 ) default NULL ,
`expire` int( 10 ) unsigned default NULL ,
PRIMARY KEY ( `id` )
) ENGINE = MYISAM

MySQL said: Documentation
#1050 - Table 'bans' already exists


-----

Should I erase the 'bans' table first then paste this in?

Or change "CREATE TABLE" to "EDIT TABLE" ?

will