Bootstrap FreeKB - mySQL / MariaDB - Sign into mySQL or MariaDB using the mysql command
mySQL / MariaDB - Sign into mySQL or MariaDB using the mysql command

Updated:   |  mySQL / MariaDB articles

Assuming you have mySQL or MariaDB installed on a Linux system, the which command can be used to determine if the mysql command line tool is installed. In this example, the mysql command line tool is installed.

~]# which mysql
/bin/mysql

 

The mysql command line tool can be used to sign into mySQL or MariaDB. By default, after a clean install of mySQL or MariaDB, you should be able to connect to the database as root on the system that mySQL or MariaDB has been installed on.

~]# mysql -u root

 

Assuming you have NOT setup passwordless authentication for root, you should be prompted for root password.

Enter password:

 

Assuming you are able to enter a valid password, something like this should be displayed.

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 26
Server version: 10.5.10-MariaDB-log MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>

 

If you want to be able to connect to mySQL or MariaDB from a remote system, refer to:

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter ce1e80 in the box below so that we can be sure you are a human.