for this statement:
mysql <my_db_name> -u<user_name> -p<password> <mysql.sql
where does mymphpadmin assume mysql.sql is located in?
for this statement:
mysql <my_db_name> -u<user_name> -p<password> <mysql.sql
where does mymphpadmin assume mysql.sql is located in?
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.
Yes, in the current working directory ... but you're not using myphpadmin, you're using the mysql
command.
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.