0

I just installed MySQL 5.6 in a new CentOS 7 Linux installation. I want to use the MySQL command line client that I have been used to using in Windows, but I cannot seem to find it. Is there a MySQL command line client for Linux? If so, how do I make sure that I have it? And how do I open it up in the GUI?

3
  • mysql is the MySQL client in command line. There is no GUI apart from the terminal window. Commented Nov 25, 2014 at 3:18
  • just issue: mysql -u mysq_user -p in the terminal. This will let you enter the mysql command line. Commented Nov 25, 2014 at 3:24
  • @unixmiah Only assuming they have a mysql server running locally. Commented Nov 25, 2014 at 3:27

2 Answers 2

1

You can open MySql command line utility using following command

mysql -u user_name -p

It will ask for password for user_name. If password is not set call as follows

mysql -u user_name
Sign up to request clarification or add additional context in comments.

Comments

1

First make sure the service is running :

sudo systemctl start mysqld

Then make sure to run the security script that will remove some dangerous defaults and lock down access to our database system a little bit.

sudo mysql_secure_installation

Now you can use the command line tool

mysql --user=user_name --password=your_password db_name

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.