skip to Main Content

I’ve connected to my MySQL database in a docker container using:

docker exec -it ti4-automation-mysql-1 bash

And I’ve logged in using:

mysql -u root -p ti4-automation

If I want to perform a command:

SHOW DATABASES; 

I get this:

enter image description here

It looks like the ; doesn’t end the command.

2

Answers


  1. you should you this command its work well in mysql docker container

    mysql -u user -p -e 'show databases;'
    
    Login or Signup to reply.
  2. You can use s which will give the following output and verify the Using delimiter: line

    mysql> s
    --------------
    mysql  Ver 14.14 Distrib 5.7.34, for Linux (x86_64) using  EditLine wrapper
    
    Connection id:          45
    Current database:       my_database
    Current user:           root@localhost
    SSL:                    Not in use
    Current pager:          stdout
    Using outfile:          ''
    Using delimiter:        ;
    Server version:         5.7.34-log MySQL Community Server (GPL)
    Protocol version:       10
    Connection:             Localhost via UNIX socket
    Server characterset:    latin1
    Db     characterset:    latin1
    Client characterset:    utf8
    Conn.  characterset:    utf8
    UNIX socket:            /var/run/mysqld/mysqld.sock
    Uptime:                 16 days 22 hours 19 min 37 sec
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search