I have file.sql, and I want to restore it. I found this command:
mysql -u username -p database_name < file.sql
Where should I put \'file.sql\' in
You can put it anywhere, where there is enough diskspace available of course.
A good place for this would be either /tmp
(on linux or similar) or c:\temp
(on windows or similar)
But assuming you use that exact line you need to change your working directory to that which holds the file.
cd /path/where/sql/file/is
And then
mysql -u username -p database_name < file.sql
If you don't have the mysql bin in your PATH you might want to run
/path/to/mysql/bin/mysql -u username -p database_name < file.sql
Or temporarily put the file.sql in the mysql bin directory (not recommended)
Another possible scenario is to point to the file in the filesystem like this
mysql -u username -p database_name < /path/where/sql/file/is/file.sql
PS. If you're on windows you might wanna change the forward slashes to backslashes.