Reputation: 9181
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?
Upvotes: 0
Views: 1718
Reputation: 4219
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
Upvotes: 1
Reputation: 12785
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
Upvotes: 1