Alex Gordon
Alex Gordon

Reputation: 60871

Which file location does phpMyAdmin look in?

For this statement:

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

Where does phpMyAdmin assume mysql.sql is located in?

Upvotes: 2

Views: 406

Answers (4)

pavium
pavium

Reputation: 15128

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

Upvotes: 1

bjelli
bjelli

Reputation: 10100

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.

Upvotes: 2

gnud
gnud

Reputation: 78628

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.

Upvotes: 2

Moak
Moak

Reputation: 12885

in the directory you are currently located in.

Upvotes: 3

Related Questions