Jump to content


Photo

Basic MySQL dump file question


  • Please log in to reply
2 replies to this topic

#1 Mouse

Mouse
  • Members
  • PipPipPip
  • Advanced Member
  • 95 posts
  • LocationToo Close to LONDON

Posted 18 December 2005 - 09:21 AM

Hello All,

First things first i am DYSLEXIC... so please make any replies as clear as possible, by this i mean in english as oposed to techie where possible... many thanks.

My reunion site has been a flat site for years and is now going dynamic thanks to PHP and MySQL. a friend has done much of the work for me and has sent me back a zipped PHP website which i have opened and unpacked successfully into my apache htdocs file and it works well. my issue is with the SQL file (a dump file i think you'd call it?)

i am trying to put it all back together. i think(?) the information i need to link it is...

$dbconn = mysql_connect("localhost","ABC","ABC123"); mysql_select_db("dlp");

what i need to know is how to unpack the dump file, where to save it relative to the website and if possible how to fill in the database connections for a testing server on my machine in Dreamweaver.

Many thanks in advance

forgot to mention, i cant ask my friend who did the work for me, at the moment as he's on honeymoon....

#2 ???

???
  • Members
  • Pip
  • Newbie
  • 2 posts

Posted 19 December 2005 - 10:56 AM

Hello,

Do you have CPanel?
If so, you can go to Mysql -> PHPMyAdmin -> Operations (i think) -> then something like "Execute Sql file" or something like that.

Anyways, browse to the file and run (on your local machine) it and that should be all you need to do.

If you do not have CPanel, then if you have ssh, all you need to do is save the file (probably with ftp, where it realy doesn't matter, as long as you know where you have saved it) and log into your server via ssh, and type:
mysql -u your_username -p < your_file.sql
Enter password: ********

And then, i think it should work.

HTH,
Peter

"peter@server-1200:~$ if (( $brain == "smart" )); then
> echo "Mwahaha i am a genios."
> fi
bash: ((: == smart : syntax error: operand expected (error token is "== smart ")"

(\_/) (O.o) This is Bunny. Copy Bunny to your signature (> <) to help him achieve world domination.

#3 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 23 December 2005 - 10:28 PM

Alternatively, you can break up your file by tables, and use LOAD DATA INFILE.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users