I'm currently experiencing an issue with MySQL Workbench where I'm unable to access my server logs in local docker container. I have confirmed that the log files do exist at the specified path in my MySQL configuration file (my.cnf).
I have verified that the file does indeed exist at the specified path:
// in `docer exec`
bash-4.4# pwd
/var/log/mysql
bash-4.4# ls
error.log mysql-slow.log mysql.log
Other Infos
[mysqld]
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
datadir = /var/lib/mysql
log_error = /var/log/mysql/error.log
general_log_file = /var/log/mysql/mysql.log
general_log = 1
slow_query_log_file = /var/log/mysql/mysql-slow.log
slow_query_log = 1
long_query_time = 2
log_queries_not_using_indexes
Already tried changing the permissions and owner, the problem still exists
I've already tried searching this forum and Google for related issues, and haven't found a clue. I don't know what the mistake is, and I apologize if I'm asking really dumb questions, but there's really nothing else I can try.
This is my first post in SOF, so please point out if there's a problem with the way the questions are asked!
Here are the steps I've taken:
- I ran a container from a MySQL image.
- I upload
my.cnfaccordingly in docker desktop. - I tried to connect to the local container using MySQL Workbench.
However, I ran into a problem where MySQL Workbench couldn't find my.cnf in the container. The server logs also indicated that it couldn't find the log file. I'm certain that the file exists in the specified location.
What's weird to me is that even though I've uploaded my.cnf, when I connect through Workbench, it doesn't end up finding my.cnf, it creates it automatically for me.
In other words, the whole problem seems to be that Workbench doesn't seem to be able to find any files created after the container is run.