i can see database in MySQL but not sure how to conect specific database and query data.

i can see database in MySQL but not sure how to conect specific database and query data.
1.0 1

#1

see error below, i can see database in MySQL but not sure how to conect specific database and query data.
mysql> show databases
-> ;
±-------------------+
| Database |
±-------------------+
| information_schema |
| retail_db |
| retail_export |
| retail_import |
±-------------------+
4 rows in set (0.00 sec)

mysql> connect jdbc:mysql://nn01.itversity.com:3306/retail_db
ERROR 2005 (HY000): Unknown MySQL server host ‘’ (2)
mysql> connect jdbc:mysql://nn01.itversity.com:3306/retail_db
ERROR 2005 (HY000): Unknown MySQL server host ‘’ (2)

mysql> use retail_db
No connection. Trying to reconnect…
ERROR 2005 (HY000): Unknown MySQL server host ‘’ (2)
ERROR:
Can’t connect to the server

mysql>


Sign up for our state of the art Big Data cluster for hands on practice as developer. Cluster have Hadoop, Spark, Hive, Sqoop, Kafka and more.



#2

This can’t be used as MySQL command. Not sure why you are using this here. You can use the below command to connect to a particular database and query the database.

use database_name;

Please find the screenshot for reference.