• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

mysql command line query command

faeronsayn

Well-known member
#1
So I want to execute queries through mysql command line on putty.

I can't seem to find a command to do that exactly. If anyone knows, please post it below.
 

Jake Bunce

XenForo moderator
Staff member
#3
Login to MySQL and select your database:

mysql -uUSERNAME -pPASSWORD DBNAME

Type queries into the mysql prompt. Note that you must end queries with a semicolon when using the mysql prompt. The enter key will merely insert a line break into the query which isn't functional. It won't execute the query until you type a semicolon and then hit enter.