Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

show databases mysql docker

First, go inside docker container, run below command
docker exec -it mysql_container_name mysql -uroot -p
where “root” is the username for MySQL database. After running above command it will ask you a password.

Then Select Database, run below command
USE Name-Of-The-Database

get the list of all tables.
show tables;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #show #databases #mysql #docker
ADD COMMENT
Topic
Name
2+5 =