what to do with this .SQL script?

Reply

Join Date: Feb 2005
Posts: 3
Reputation: kubota is an unknown quantity at this point 
Solved Threads: 0
kubota kubota is offline Offline
Newbie Poster

what to do with this .SQL script?

 
0
  #1
Feb 9th, 2005
hi, in order to install my php gallery, i have to "Run the photos.sql script in your MySQL database" what does this mean? i know i have mysql, as i have a phpBB2 forum running. but how do i do this? thanks
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 181
Reputation: Paul.Esson is an unknown quantity at this point 
Solved Threads: 10
Paul.Esson's Avatar
Paul.Esson Paul.Esson is offline Offline
Junior Poster

Re: what to do with this .SQL script?

 
0
  #2
Feb 11th, 2005
somthing like

  1.  
  2. mysql < photos.sql

should do the trick
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 3
Reputation: kubota is an unknown quantity at this point 
Solved Threads: 0
kubota kubota is offline Offline
Newbie Poster

Re: what to do with this .SQL script?

 
0
  #3
Feb 11th, 2005
??? but i wanted to know how to add it to my MySQL database :O
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 181
Reputation: Paul.Esson is an unknown quantity at this point 
Solved Threads: 10
Paul.Esson's Avatar
Paul.Esson Paul.Esson is offline Offline
Junior Poster

Re: what to do with this .SQL script?

 
0
  #4
Feb 14th, 2005
mysql mydatabasesname < photos.sql
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 3
Reputation: kubota is an unknown quantity at this point 
Solved Threads: 0
kubota kubota is offline Offline
Newbie Poster

Re: what to do with this .SQL script?

 
0
  #5
Feb 14th, 2005
Originally Posted by Paul.Esson
mysql mydatabasesname < photos.sql
errrr.....have you actually read my question, your an idiot or what, if ya not gonna help, fade away.......
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 181
Reputation: Paul.Esson is an unknown quantity at this point 
Solved Threads: 10
Paul.Esson's Avatar
Paul.Esson Paul.Esson is offline Offline
Junior Poster

Re: what to do with this .SQL script?

 
0
  #6
Feb 15th, 2005
Well hmm, Yes I did, LETS say i have a database called test !! and a mysql script that looks like such

  1. [root@Kat root]# cat pont.sql
  2. #DROP TABLE `test`
  3. #CREATE TABLE test(nick VARCHAR(30), about VARCHAR(30));
  4.  
  5. INSERT INTO test () VALUES ("Paul.Esson" , "Trying to be nice" );
  6. INSERT INTO test () VALUES ("kubota" , "Idiot");
  7. SELECT * FROM test

because I do, Now I wish to run this script
  1. [root@Kat root]# mysql test < pont.sql
  2. nick about
  3. Paul.Esson Trying to be nice
  4. kubota Idiot
  5. Paul.Esson Trying to be nice
  6. kubota Idiot
  7. Paul.Esson Trying to be nice
  8. kubota Idiot
  9. [root@Kat root]#

It works for me

You might try reading the man pages ?

  1. [root@Kat root]# man mysql | tail -n 20 | head -n 5
  2. EXAMPLE
  3. You can also READ a backup dump file back INTO MySQL with:
  4.  
  5. mysql database < backup-file.sql

So basicly what you need to do is open up some kinda console
start > run > cmd

in windows

then you need to make certain that mysql is in your path, prolly easyest to change to the mySQL dir, then you type

mysql theDatabaseName < C:\path\to\the\file\photowhatever.sql

and pray it should hopfully work without a hitch.
Reply With Quote Quick reply to this message  
Join Date: Nov 2003
Posts: 360
Reputation: Gary King will become famous soon enough Gary King will become famous soon enough 
Solved Threads: 5
Team Colleague
Gary King's Avatar
Gary King Gary King is offline Offline
PHP/vBulletin Guru

Re: what to do with this .SQL script?

 
0
  #7
Feb 21st, 2005
Do you have phpMyAdmin installed? If not, then INSTALL IT. It's the best way to work with MySQL for dummies (even experts use it, very easy to use.) I'm sure you already have it installed on your webhost, though. Then just import the file in phpMyAdmin.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC