How to open the MySQL console
The MySQL console allows you to directly execute SQL commands, without having to use a programming language adapter such as PHP, Ruby, or Python.
Run this command, replacing USERNAME
with your MySQL username; you will be prompted for the password.
mysql -u USERNAME -p -h localhost
N.B. This command assumes the MySQL database is running on your computer. If you which to open up a MySQL console for a database on another computer, you will have to change the -h
(host) option to something other than localhost
.