tags:

views:

69

answers:

4

for this statement:

mysql <my_db_name> -u<user_name> -p<password> <mysql.sql

where does mymphpadmin assume mysql.sql is located in?

+3  A: 

in the directory you are currently located in.

Moak
+2  A: 

First, this is clearly not about phpMyAdmin, but about the mysql command line tool.

Second, in the command you posted, the mysql utility does not look for a file name at all, it reads stdin - your shell (like bash or the windows cmd) opens the file and sets it up as the stdin of mysql.

Thirdly, all relative filesystem paths (any path that doesn't start with a root), are relative to the current working directory.

gnud
im sorry can you elaborate on your second point please
I__
Read about redirection at wikipedia, http://en.wikipedia.org/wiki/Redirection_%28computing%29 That was a link on the wikipedia page on `stdin`
gnud
+1  A: 

Yes, in the current working directory ... but you're not using myphpadmin, you're using the mysql command.

pavium
+2  A: 

regarding gnuds second point:

Reading in a file via < is not specific to mysql. This works for any command and any file on the commandline. (on UNIX as well as on Windows):

somecommand < somefile

data from the file somefile is sent into the command via a channel called STDIN.

bjelli