
06-24-2002, 06:04 AM
|
|
WHT Addict
|
|
Join Date: May 2002
Posts: 148
|
|
I'm a newbie with MySQL and I'm trying to import a database for a vBulletin board.
The vBulletin manual says that to restore a database you need to type "mysql -uUsername -p password < /path/to/file/"
Well what does "<" mean and how do you get it to work?
I've tried typing that in while in shell and it doesn't work.
Also, can you do this from phpMyAdmin? For some reason I can't get the mysql command to work in shell.
Thanks for any help! 
|

06-24-2002, 06:09 AM
|
|
Web Hosting Master
|
|
Join Date: Feb 2002
Posts: 956
|
|
Yes you can use phpMyAdmin but you need at least 2.2.4
__________________
This forum officially ****ing sucks
|

06-24-2002, 06:10 AM
|
|
WHT Addict
|
|
Join Date: May 2002
Posts: 148
|
|
Ok but how do I use that command? I typed in < /path/to/file/ in phpMyAdmin but it didn't work...
What do I have to type in to get it to work?
|

06-24-2002, 06:16 AM
|
|
Web Hosting Master
|
|
Join Date: Feb 2002
Posts: 956
|
|
Quote:
Originally posted by Radon3k
Ok but how do I use that command? I typed in < /path/to/file/ in phpMyAdmin but it didn't work...
What do I have to type in to get it to work?
|
lol phpmyadmin is in pure php, its a php script
install it from www.phpmyadmin.net
click on the db
and copy or upload the mysql schema into where it says.
|

06-24-2002, 06:18 AM
|
|
WHT Addict
|
|
Join Date: May 2002
Posts: 148
|
|
Um...I know what it is, but I need to import a file called vbulletin.sql
I tried upping it but it said "no query found"...I did open up vbulletin.sql but it's so big I can't and don't have the time to copy and paste bits of it at a time. Is there another way to upload it?
|

06-24-2002, 06:32 AM
|
|
Closed
|
|
Join Date: Oct 2000
Location: Australia
Posts: 538
|
|
Re: Argh...Newbie with MySQL
Quote:
Originally posted by Radon3k
I'm a newbie with MySQL and I'm trying to import a database for a vBulletin board.
The vBulletin manual says that to restore a database you need to type "mysql -uUsername -p password < /path/to/file/"
Well what does "<" mean and how do you get it to work?
|
Back to this one, the "<" will use your file (/path/to/file) as input to the command. So in this case, you'd be firing up the MySQL client ("mysql -uUsername -p password") and passing the SQL commands in your file as input, thus rebuilding your database ("< /path/to/file/").
|

06-24-2002, 06:34 AM
|
|
WHT Addict
|
|
Join Date: May 2002
Posts: 148
|
|
Yes I did that and nothing happens, it tells me it's not a valid querry...
|

06-24-2002, 06:35 AM
|
|
WHT Addict
|
|
Join Date: May 2002
Posts: 148
|
|
In fact, this is what it tells me:
You have an error in your SQL syntax near '< /usr/local/psa/home/vhosts/domain.com/vbulletin.sql' at line 1
(Of course domain.com is replaced w/ the original)
|

06-24-2002, 06:35 AM
|
|
Web Hosting Master
|
|
Join Date: Feb 2002
Posts: 956
|
|
well upload phpmyadmin to old host where vb board currently is, optimize database then try to upload to new host again
__________________
This forum officially ****ing sucks
|

06-24-2002, 06:37 AM
|
|
WHT Addict
|
|
Join Date: May 2002
Posts: 148
|
|
In phpMyAdmin, the "<" command is not working...I do need to type in the name of the backup file that I upped, yes? If so, then I'm doing it right but it wont' work....
|

06-24-2002, 06:39 AM
|
|
Web Hosting Master
|
|
Join Date: Feb 2002
Posts: 956
|
|
umm < isn't for phpmyadmin
__________________
This forum officially ****ing sucks
|

06-24-2002, 06:40 AM
|
|
WHT Addict
|
|
Join Date: May 2002
Posts: 148
|
|
Well then what do I use for phpMyAdmin?? And btw, every time I've tried that command it doesn't work either, but that's a different story....
|

06-24-2002, 06:42 AM
|
|
Closed
|
|
Join Date: Oct 2000
Location: Australia
Posts: 538
|
|
Quote:
Originally posted by Radon3k
In fact, this is what it tells me:
You have an error in your SQL syntax near '< /usr/local/psa/home/vhosts/domain.com/vbulletin.sql' at line 1
(Of course domain.com is replaced w/ the original)
|
Is this Windows or Unix that you're using? And if you're using Unix, which shell?
|

06-24-2002, 06:42 AM
|
|
WHT Addict
|
|
Join Date: May 2002
Posts: 148
|
|
|

06-24-2002, 06:47 AM
|
|
Closed
|
|
Join Date: Oct 2000
Location: Australia
Posts: 538
|
|
I just checked phpMyAdmin, which is probably easier. Just select your database on the left, and you should get a screen with lots of options for your database. Scroll down to "Run SQL query/queries on database YOURDATABASE". Then there's an option for "Or Location of the textfile". Click the browse button and select the file from your computer to upload and run.
As for the command line, I don't know why "<" isn't working. I thought it was standard for all shells, but maybe I'm wrong. Try typing "bash" first to go to the bash shell, and try the command there. I normally use bash, and it certainly works there.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
| Postbit Selector |
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
| Login: |
|
|
| Advertisement: |
|
|
| Web Hosting News: |
|
|
|