944,132 Members | Top Members by Rank

Ad:
  • MySQL Discussion Thread
  • Unsolved
  • Views: 7556
  • MySQL RSS
Feb 9th, 2005
0

what to do with this .SQL script?

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
kubota is offline Offline
3 posts
since Feb 2005
Feb 11th, 2005
0

Re: what to do with this .SQL script?

somthing like

MySQL Syntax (Toggle Plain Text)
  1.  
  2. mysql < photos.sql

should do the trick
Reputation Points: 21
Solved Threads: 10
Junior Poster
Paul.Esson is offline Offline
181 posts
since Feb 2005
Feb 11th, 2005
0

Re: what to do with this .SQL script?

??? but i wanted to know how to add it to my MySQL database :O
Reputation Points: 10
Solved Threads: 0
Newbie Poster
kubota is offline Offline
3 posts
since Feb 2005
Feb 14th, 2005
0

Re: what to do with this .SQL script?

mysql mydatabasesname < photos.sql
Reputation Points: 21
Solved Threads: 10
Junior Poster
Paul.Esson is offline Offline
181 posts
since Feb 2005
Feb 14th, 2005
0

Re: what to do with this .SQL script?

Quote 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.......
Reputation Points: 10
Solved Threads: 0
Newbie Poster
kubota is offline Offline
3 posts
since Feb 2005
Feb 15th, 2005
0

Re: what to do with this .SQL script?

Well hmm, Yes I did, LETS say i have a database called test !! and a mysql script that looks like such

MySQL Syntax (Toggle Plain Text)
  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
MySQL Syntax (Toggle Plain Text)
  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 ?

MySQL Syntax (Toggle Plain Text)
  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.
Reputation Points: 21
Solved Threads: 10
Junior Poster
Paul.Esson is offline Offline
181 posts
since Feb 2005
Feb 21st, 2005
0

Re: what to do with this .SQL script?

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.
Team Colleague
Reputation Points: 53
Solved Threads: 5
PHP/vBulletin Guru
Gary King is offline Offline
360 posts
since Nov 2003

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MySQL Forum Timeline: database driven link layout
Next Thread in MySQL Forum Timeline: Connection problem





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC