Previous Thread
Next Thread
Print Thread
Rate Thread
#214194 03/10/2002 1:30 AM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
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?

Sponsored Links
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
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


- Allen wavey
- What Drives You?
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
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

Sponsored Links
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
Offline
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.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Posts: 70
Joined: January 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)