Reputation: 60871
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
Reputation: 15128
Yes, in the current working directory. but you're not using phpMyAdmin, you're using the mysql
command.
Upvotes: 1
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
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