|
|
Joined: Apr 2001
Posts: 3,266
Member
|
Member
Joined: Apr 2001
Posts: 3,266 |
General question here since I am a PHP and MYSQL newbie.
In PHPadmin there is an option to download the structure and data from the database (backup) it downloads a sql file which I beleive is my database. How does one go about uploading it back to the database if it becomes corrupted or dropped or whatever. I take it if the database gets trashed you drop whats left and upload a backup?
|
|
|
|
Joined: Apr 2001
Posts: 3,266
Member
|
Member
Joined: Apr 2001
Posts: 3,266 |
anybody know how to do this here? I find it hard to beleive that no one has responded in two days []/forum/images/icons/wink.gif[/]
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
I'd like to know the answer as well. I really don't know how to backup / restore in PHP MyAdmin. I know how to do it at the shell level. If you've got telnet SSH access the instructions are here: http://www.infopop.com/support/ubbthreads/UBBthreads_backup_transfer.html
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
If you have root access you could prolly telnet/ftp it in, but the correct method for restoring a backup is: - telnet into server
- create a database on the mysql if necessary (ask your server admin for help with this as it varies from machine to machine)
- at the prompt type
mysql -uUSERNAME -p newdbname < /path/to/dump.sql this takes a couple of minutes depending on your database size, but you can track the progress either by FTP (checking the /mysql/data/newdbname and see the files appearing) or by phpMyAdmin (you should see the files appearing there) - when it is completed, it will bring you back to the prompt
|
|
|
|
Joined: Apr 2001
Posts: 3,266
Member
|
Member
Joined: Apr 2001
Posts: 3,266 |
actually I can never get that command to work from the phpadmin window that sends commands to the database. The only way I can restore is copy and paste from the SQL file
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
That command works at the shell prompt using telnet...not in PHP My Admin.
|
|
|
|
Joined: Apr 2002
Posts: 4
Lurker
|
Lurker
Joined: Apr 2002
Posts: 4 |
This should also work from a telnet prompt: #mysql -p (hit return and you will be asked for password) >mysql use databasename; >mysql source /path/to/database.dump; >mysql quit; Bill.
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 1,157
Joined: July 2001
|
|
Forums63
Topics37,575
Posts293,931
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|