This assumes you have installed mySQL or MariaDB, and you are now ready to connect. On the command line, you will use the mysql command and the -u (username) and -p (password) options to connect. Type the password entered during the mysql_secure_installation and you should be connected.
[root@server1 ~]# mysql -u root -p Enter password:
Once successfully connect, you will be at the mysql prompt, like this.