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

12 Years
Discussion Span
Last Post by Gary King

??? but i wanted to know how to add it to my MySQL database :O


mysql mydatabasesname < photos.sql

errrr.....have you actually read my question, your an idiot or what, if ya not gonna help, fade away.......


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

[root@Kat root]# cat pont.sql
#DROP TABLE `test`
#CREATE TABLE test(nick VARCHAR(30), about VARCHAR(30));

INSERT INTO test () VALUES ("Paul.Esson" , "Trying to be nice" );
INSERT INTO test () VALUES ("kubota" , "Idiot");

because I do, Now I wish to run this script

[root@Kat root]# mysql test < pont.sql
nick    about
Paul.Esson      Trying to be nice
kubota  Idiot
Paul.Esson      Trying to be nice
kubota  Idiot
Paul.Esson      Trying to be nice
kubota  Idiot
[root@Kat root]#

It works for me

You might try reading the man pages ?

[root@Kat root]# man mysql | tail -n 20 | head -n 5
       You can also read a backup dump file back into MySQL with:

       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.


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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.