Click to See Complete Forum and Search --> : Backing up mysql database.


extatic
02-24-2005, 12:53 AM
We are migrating to a new server, and it is up and running. The last step is to take a database from our old box and move it to our new box.
We created the file phpbb_db.sql
It is a phpBB2 database file.
We need to set up a database with all that, or just copy it to the new box, which is running FreeBSD 5.3.

I tried moving the .sql file into /var/db/mysql, but it didn't work.
Does anyone have any ideas ?

ph34r
02-24-2005, 09:36 AM
Look at mysqldump and batch-processing with the mysql client.

jme
02-24-2005, 11:13 AM
Create the empty database on the new box and then run from the command line:


mysql databasename < /path/to/phpbb_db.sql -u username -p


It will then prompt you for your password and upload the database structure and content into the new database. Obviously changing the bold font to the relevant things. ;)



HTH

Jamie