mysql docker connection error: Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’

I started docker mysql container and try to connect it outside docker using mysql command but got error:

It's because mysql clinet will use unix socket protocol as default protocol value to connect to mysql server if not specifying protocol or host argument, but mysql docker container is listening on tcp socket.


Specify IP address as host argument value in mysql command will make mysql to connect using TCP protocol instead of default unix socket.
(Note that using localhost as host argument value will still using unix socket protocol)

Or use

This command will specify protocol argument explicitly

MySQL find all MyISAM tables

The information_schema table saves information about databases, tables, columns, indexes and triggers, etc.


To list all MyISAM tables, we can use following SQL


And to find MyISAM tables in database wordpress


Next filter them with a table prefix wp_

Check MySQL case-insensitive query or table name

I tried to install Umbrao CMS, it supports MySQL database but it need MySQL to support case-insensitive query and table name.


Following is way to check whether case-insensitive query is supported:

show variables where variable_name='lower_case_table_names';

or check lower_case_table_names option in my.ini (MySQL configuration file)


If this option's value is set to 1, then case-insensitive query and table name is supported.