Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Feb 2003
Posts: 174
Member
Member
Joined: Feb 2003
Posts: 174
Ok,
Ive changed server and i backup up everything including all the database.
Once I got my new hosting account I uploaded all the files and copied the permissions from the previous installation which is still on the old server.
However I cannot restore the backup of the database as I need to be admin to do it. However I can't log in as admin until I can restore the database. Chicken and the egg situation.
So how can I restore the backup please as my hosting company cant do it and It's driving me mad.

Thanks for you help in advance.

If you need to see the error's im having please see http://www.cellstreet.com

Sponsored Links
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Have you tried shell access or PHPmyadmin

In shell once you login to mysql you can type this

mysql -u USERNAME -p DBNAME < backup.sql

Joined: Feb 2003
Posts: 174
Member
Member
Joined: Feb 2003
Posts: 174
Im a n00b, please could you explain in detail what i would need to do?
I dont think i have shell access with my new hosting company.

Thanks for the prompt reply

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Have you installed PhpMyAdmin before?

Have you tried shell access

You would download a utility like putty( http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe ) and telnet or ssh into your server just like ftp and input your username and password

If you have shell it will allow you to do that.

PhpMyAdmin can be downloaded from http://www.phpmyadmin.net and you simply need to edit the config file and upload and then login.

Joined: Feb 2003
Posts: 174
Member
Member
Joined: Feb 2003
Posts: 174
No ive never used phpmyadmin.

I dont have a shall account with my new hosting company though. Therefore I need to find a differed way to restore the backup.

Thanks again for your prompt reply

Sponsored Links
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
You double checked on shell? as it is the fastest way to do it

Phpmyadmin you can download from the link above and it is as simple as filling in the config file and uploading the program

Joined: Feb 2003
Posts: 174
Member
Member
Joined: Feb 2003
Posts: 174
ohh i have just found myphpadmin in the control panel and logged into it. I can execute commands if I want to.
Is there a command where I can specify the location of the database and have it install it? The backup is in alter-tables.

Thanks again

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
well have you created your database yet?


First you need to create the database threads will reside in. You will then need to make sure permissions for the user is set on the database. You can check this by clicking privelidges.


Then you need to make sure the backups are on your harddrive.

You can then once you click on your database once it is created and permission set. IT WILL BE EMPTY. you then click on SQL and you will set a window with a box. Underneath the box will be a small one line box and a browse button. Click browse and select the sql file you want added to the database. After that hit go. You will need to do this for every sql table file as Threads backup backs them up by table

Joined: Feb 2003
Posts: 174
Member
Member
Joined: Feb 2003
Posts: 174
Yes, thats what ive logged into, (the myphpadmin control panel for that specific database). I just need to import the alter-tables as the database is empty.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
YES DO AS I STATED ABOVE

Sponsored Links
Joined: Feb 2003
Posts: 174
Member
Member
Joined: Feb 2003
Posts: 174
sorry missed the other part.

I must have a custom version of it installed as it's a custom control panel to do other config things for the website. I think this because I dont have the options you said.

Is there no command I can give it to import it from a location on the server or from my hard drive?

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
I would have to see what you have otherwise it is just stabing in the dark

In most all versions of PHPmyadmin that I know of they all have a sql box and under that is an line box to upload a local file

Joined: Feb 2003
Posts: 174
Member
Member
Joined: Feb 2003
Posts: 174
ohh i found it. I pointed it to one of the files and it said this:

DROP TABLE IF EXISTS w3t_AddressBook

MySQL said:


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 '---------------------------------------------------------
--
--

Joined: Feb 2003
Posts: 174
Member
Member
Joined: Feb 2003
Posts: 174
in fact it does it to all the files.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
OKay backup your backups to another directory as well

Then edit say w3t_AddressBook.sql and remove everything above the CREATE TABLE LINE and try again

Joined: Feb 2003
Posts: 174
Member
Member
Joined: Feb 2003
Posts: 174
sorry i dont understand, can you explain a little more please? my backup isnt 1 file .sql it's loads of small ones.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
HMM I thought I just explained in the post above.

I said make backups of all your backups in another directory.

I said then take w3t_AddressBook.sql and remove everything above the CREATE TABLE line and then try restoring it again.

the one table I meantioned is a test. That should make your restore work as it is choking on the drop table. Once you test the file above you will need to do this for all backup.sql files

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
he didn't backup the database he backed up the threads tables through the Admin function of Threads.. thats why he has the smaller table files instead of the single database backup you would have gotten through phpmyadmin...so I would guess the easiest thing would be for him to install the threads on the new box with any table altering mods like panelgen or IIP or have a dozen other mods and then put those files on his new server in the ubbthreads backup directory and use the threads restore function through admin.. either that or go to phpmyadmin on the old server and backup the actual database and then go to the newbox phpmyadmin and restore it...

Joined: Feb 2003
Posts: 174
Member
Member
Joined: Feb 2003
Posts: 174
ahh i c, ive gone and backed it up again under 1 file now. I'll see if that works

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
You will most likely time out with one file

My example was based on the way you backed them up before in Threads simply remove the lines above CREATE TABLE in the backups. PHPmyadmin does not like them

If you do as I say you will be up and running.

Many times phpmyadmin will not handle larger backups

If at all possible I would see why in the future after this is you can not get shell access. One file twenty files it still takes time in phpadmin. With shell access your database is restored in a fraction of the time.

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
aye shell access is the way to go...

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Also you might want to check your PATH's as when you click a link off your nav bar it is going to your cgi-bin

Joined: Feb 2003
Posts: 174
Member
Member
Joined: Feb 2003
Posts: 174
removing the things in each file is working, im going through the files 1 by 1 and uploading them to the database. Lets hope it works after this

Joined: Sep 2003
Posts: 803
Coder
Coder
Offline
Joined: Sep 2003
Posts: 803
I got the same errors on my forum move and the fix I had to do was simple. I dropeed all the tables in the mysql and then went into myphp and laoded the back up I made. worked like a charm... I also had to change some of the info in the config.php to the new server route.
this stuff had to be altered a little bit.....
Code
$dbhost = "localhost";<br />$dbuname = "bla bla";<br />$dbpass = "new pass here";<br />$dbname = "name it here";<br />$prefix = "nuke";<br />$user_prefix = "nuke";<br />$dbtype = "MySQL";<br />$sitekey = "use anything ";<br />$gfx_chk = 0;  

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Dr Chaos,

He has PHPMYAdmin working. That is not his issue. His new server has PhpMyAdmin


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 20240430)