mysql script files
I'm starting to play around with mysql. I can run a script file - say a_script_file.sql in the sql directory in my home directory from the bash command line by invoking:
mysql -u username -p database_name < sql/a_script_file.sql
It works after inputing password at the prompt.
However from the mysql prompt, when connected to the database, I run:
database_name < sql/a_script_file.sql;
I receive an error message "You have an error in your SQL syntax 'database_name < sql/a_script_file.sql' at line 1.
I can't figure out what that syntax error might be, can anyone help.
Regards Richard
|