MySQL: Run SQL Queries From Command Line
Writing by shivdev on Thursday, 10 of March , 2011 at 5:51 pm
Here’s the syntax:
mysql -u user -p password database -e ‘SQL Query’
Here are a few examples:
mysql -u root -p mypass world -e ‘select * from city;’
mysql -u root -p mypass world -e ‘desc city;’
Leave a comment
Category: SQL DB
- Add this post to
- Del.icio.us -
- Digg -
- -
- Tweet -
-
-
No comments yet.
You must be logged in to post a comment.