I am trying to execute the SQL commands through the shell script.
I am able to connect through terminal.but when I am trying to connect using a shell script, It is showing access denied. How can we execute SQL scripts through the Linux shell script?
mysql -u "root" "-pspanidea" "mysql" < "sqlscript.sql"?
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)