user3484989
user3484989

Reputation:

The Mysql command line doesn't launch

i just installed Mysql 5.6.20 and set the path in the system when i try to launch the Mysql command line it starts and closes immediately. any solution ?

Upvotes: 0

Views: 9622

Answers (1)

Brian DeMilia
Brian DeMilia

Reputation: 13248

Open up the command line (start menu, run, cmd)

Type in:

cd c:\xyz\mysql\bin

Where xyz is the full path to your mysql's bin folder (this is probably the same as where you currently are, clicking on the program itself)

Then type in (in the command line):

mysql --user=root --password=xyz db_name

Where root is either root (if you want to login as root) or the username that you want to login as. And change xyz to the password for that user. Change db_name to the name of the database you want to login to.

Then you can run a query, like:

select * from tablename limit 1;

Here's an example:

enter image description here

Upvotes: 1

Related Questions