How to connect to my MySQL Database server using command line

You can connect to your MySQL/MariaDB database server using the mysql command line.

The syntax is:

mysql -u user_name -h mysql_server_ip_address_here -p db_name_here

jose@zennewlife:~$ mysql -u funxxxx_root -h webhostingxxxxx -p funxxx_root
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 11112967
Server version: 5.5.5-10.3.22-MariaDB-cll-lve MariaDB Server

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

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

mysql>

Leave a Comment

Your email address will not be published. Required fields are marked *