You can achieve this by using the following command -
mysql -u user -p -e 'SQL Query' database
Where,-u : Specify mysql database user name
-p : Prompt for password
-e : Execute sql query
database : Specify database name
note : You don't need to specify user and password if you have not set up authentication.
No comments:
Post a Comment