everyone. I have noticed strange behavior during MySQL docker container startup. Basically I'm trying to run the following command
docker run --name mysql -e MYSQL_ROOT_PASSWORD=root -d mysql:8.0.29
but after that I see from the logs that container after successful startup suddenly receives SHUTDOWN command, and reinitialize database again
2022-07-25T19:33:26.423537Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.29) MySQL Community Server - GPL.
Here is all the logs:
2022-07-25 19:33:19+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.29-1.el8 started.
2022-07-25 19:33:19+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2022-07-25 19:33:19+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.29-1.el8 started.
2022-07-25 19:33:19+00:00 [Note] [Entrypoint]: Initializing database files
2022-07-25T19:33:19.770157Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.29) initializing of server in progress as process 42
2022-07-25T19:33:19.775554Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-07-25T19:33:20.037982Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-07-25T19:33:21.277581Z 6 [Warning] [MY-010453] [Server] root#localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
2022-07-25 19:33:23+00:00 [Note] [Entrypoint]: Database files initialized
2022-07-25 19:33:23+00:00 [Note] [Entrypoint]: Starting temporary server
2022-07-25T19:33:23.494658Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.29) starting as process 91
2022-07-25T19:33:23.505604Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-07-25T19:33:23.590481Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-07-25T19:33:23.778598Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2022-07-25T19:33:23.778621Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2022-07-25T19:33:23.779801Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2022-07-25T19:33:23.790924Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: /var/run/mysqld/mysqlx.sock
2022-07-25T19:33:23.790961Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.29' socket: '/var/run/mysqld/mysqld.sock' port: 0 MySQL Community Server - GPL.
2022-07-25 19:33:23+00:00 [Note] [Entrypoint]: Temporary server started.
'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
2022-07-25 19:33:24+00:00 [Note] [Entrypoint]: Stopping temporary server
2022-07-25T19:33:24.911894Z 10 [System] [MY-013172] [Server] Received SHUTDOWN from user root. Shutting down mysqld (Version: 8.0.29).
2022-07-25T19:33:26.423537Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.29) MySQL Community Server - GPL.
2022-07-25 19:33:26+00:00 [Note] [Entrypoint]: Temporary server stopped
2022-07-25 19:33:26+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up.
2022-07-25T19:33:27.122487Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.29) starting as process 1
2022-07-25T19:33:27.128121Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-07-25T19:33:27.217345Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-07-25T19:33:27.410605Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2022-07-25T19:33:27.410659Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2022-07-25T19:33:27.412287Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2022-07-25T19:33:27.431360Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2022-07-25T19:33:27.431373Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.29' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
And after second attempt container is up and running normally. So my question is - how to identify what causes to the SHUTDOWN command?
That's a normal consequence of the way the mysql image runs its first-time initialization scripts. Note the Initializing database files message and the Temporary server started...Temporary server stopped around the first Received SHUTDOWN message.
You can see this logic in the entrypoint script itself. That script runs (using shell functions defined previously in the script, trimmed down somewhat)
# there's no database, so it needs to be initialized
if [ -z "$DATABASE_ALREADY_EXISTS" ]; then
docker_init_database_dir "$#"
mysql_note "Starting temporary server"
docker_temp_server_start "$#"
mysql_note "Temporary server started"
docker_setup_db
docker_process_init_files /docker-entrypoint-initdb.d/*
mysql_note "Stopping temporary server"
docker_temp_server_stop
mysql_note "Temporary server stopped"
fi
The mysql_note lines are visible in the container output you quote.
More specifically, the temporary server is accessible over a Unix socket within the container filesystem, but it is not accessible over the network. This gives a point where the database hasn't been set up yet, but it's still possible to run local mysql commands, for example from the initdb scripts. Once this phase has been complete, then the database restarts with its normal options.
If you're probing to see if the database is ready yet, maybe using a mysql client in a shell loop or a TCP client like the wait-for script, this means that the database won't appear "ready" until all of the initdb scripts have run.
Related
I'm using laravel sail to launch a statamic website on my local machine (macOS). All packages are up-to-date and launch correctly however, the mysql service starts, then fails due to "another process with pid 62 is using unix socket file.".
I'm using the default sail docker-compose file, uneditted. It is working on my other, linux machine correctly with no issues. When visiting localhost, I'm met with "SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for mysql failed: Name or service not known" which makes me think that it is connecting somehow as I would normally expect connection refused?
Here are the docker mysql container logs:
[Entrypoint] MySQL Docker Image 8.0.32-1.2.11-server
[Entrypoint] Starting MySQL 8.0.32-1.2.11-server
2023-01-26T21:17:04.876429Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
2023-01-26T21:17:04.878708Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.32) starting as process 1
2023-01-26T21:17:04.885183Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-01-26T21:17:05.037353Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2023-01-26T21:17:05.189336Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2023-01-26T21:17:05.189362Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2023-01-26T21:17:05.189506Z 0 [ERROR] [MY-010259] [Server] Another process with pid 62 is using unix socket file.
2023-01-26T21:17:05.189518Z 0 [ERROR] [MY-010268] [Server] Unable to setup unix socket lock file.
2023-01-26T21:17:05.189521Z 0 [ERROR] [MY-010119] [Server] Aborting
2023-01-26T21:17:06.724573Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.32) MySQL Community Server - GPL.
Thanks in advance.
I solve mine (WSL2, Docker Desktop) by opening the Docker Desktop GUI, opened the Volumes sidebar. Search for all volume that has "mysql" on their name and delete those volumes. Then run docker compose up again.
I'm trying to set up MySQL on my MacBook Pro, OS Monterey. When I press "Start MySQL Server" in System Preferences, it turns on, and then back off again. Sometimes it will stay on (after uninstalling, restarting my computer, and reinstalling), however when I try mysql -u root -p in terminal, or logging in on MySQL Workbench with the password I set during install, it says Access Denied. When I try to initialize a database, I get this error:
2022-08-17T13:58:03.594154Z 0 [System] [MY-013169] [Server] /usr/local/mysql-8.0.30-macos12-arm64/bin/mysqld (mysqld 8.0.30) initializing of server in progress as process 1279
2022-08-17T13:58:03.596412Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /usr/local/mysql-8.0.30-macos12-arm64/data/ is case insensitive
2022-08-17T13:58:03.604502Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-08-17T13:58:03.721094Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-08-17T13:58:05.536330Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root#localhost: W<dvfErrh0DC
2022-08-17T13:58:06.411738Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user <via user signal>. Shutting down mysqld (Version: 8.0.30).
2022-08-17T13:58:07.176536Z 0 [System] [MY-010116] [Server] /usr/local/mysql-8.0.30-macos12-arm64/bin/mysqld (mysqld 8.0.30) starting as process 1284
2022-08-17T13:58:07.179562Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /usr/local/mysql-8.0.30-macos12-arm64/data/ is case insensitive
2022-08-17T13:58:07.194523Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-08-17T13:58:07.269541Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-08-17T13:58:07.400561Z 0 [ERROR] [MY-011300] [Server] Plugin mysqlx reported: 'Setup of socket: '/tmp/mysqlx.sock' failed, can't open lock file /tmp/mysqlx.sock.lock'
2022-08-17T13:58:07.498398Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2022-08-17T13:58:07.498450Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2022-08-17T13:58:07.499048Z 0 [ERROR] [MY-010262] [Server] Can't start server: Bind on TCP/IP port: Address already in use
2022-08-17T13:58:07.499068Z 0 [ERROR] [MY-010257] [Server] Do you already have another mysqld server running on port: 3306 ?
2022-08-17T13:58:07.499087Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-08-17T13:58:08.543591Z 0 [System] [MY-010910] [Server] /usr/local/mysql-8.0.30-macos12-arm64/bin/mysqld: Shutdown complete (mysqld 8.0.30) MySQL Community Server - GPL.
I'm not really sure what to do at this point. Any help would be greatly appreciated.
Edit:
To summarize, in System Preferences when I press "Start MySQL Server", it turns on for a few seconds and then turns off again. That is my first issue. The second problem is that if it stays on, I can't log in. I've tried both on the command line and using MySQL Workbench.
The issue was that I had installed MySQL previously with Homebrew and they were both trying to run on port 3306.
When I run my Jhipster application in docker with a MySQL database, the data will be deleted after some time.
Looking at the MySQL logs, I can see that the MySQL database recieves a SHUTDOWN command from the root user, then goes through an initialization phase.
[System] [MY-013172] [Server] Received SHUTDOWN from user root. Shutting down mysqld (Version: 8.0.29).
[System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.29) MySQL Community Server - GPL.
[Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.29-1.el8 started.
[Note] [Entrypoint]: Switching to dedicated user 'mysql'
[Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.29-1.el8 started.
'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
[Warning] [MY-011068] [Server] The syntax '--ssl=off' is deprecated and will be removed in a future release. Please use --tls-version=invalid instead.
[System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.29) starting as process 1
[System] [MY-013576] [InnoDB] InnoDB initialization has started.
[System] [MY-013577] [InnoDB] InnoDB initialization has ended.
[Warning] [MY-011302] [Server] Plugin mysqlx reported: 'Failed at SSL configuration: "SSL context is not usable without certificate and private key"'
[System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
[System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.29' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
When it comes back online, my JHipster app doesn't have any application data saved to the database even though I have made a docker volume for MySQL and have it attached. This includes entity data and user data, so I am unable to login.
Restarting the JHipster app will give a clean install of the database connected to the application, but doing this everytime I notice MySQL has failed is not a good long-term solution.
I'm not sure if this is an error from MySQL crashing or if JHipster is somehow clearing the database with liquibase. Any help would be appreciated.
After our IT department increased the server's RAM memory MySql docker container stopped working all of the sudden.
The initial error was:
2021-10-05 07:49:44+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.22-1debian10 started.
2021-10-05 07:49:44+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2021-10-05 07:49:44+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.22-1debian10 started.
2021-10-05 07:49:44+00:00 [Note] [Entrypoint]: Initializing database files
2021-10-05T07:49:44.695485Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.25) initializing of server in progress as process 44
2021-10-05T07:49:44.700805Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-10-05T07:49:44.709596Z 1 [ERROR] [MY-012576] [InnoDB] Unable to create temporary file; errno: 13
2021-10-05T07:49:44.709749Z 1 [ERROR] [MY-012929] [InnoDB] InnoDB Database creation was aborted with error Generic error. You may need to delete the ibdata1 file before trying to start up again.
2021-10-05T07:49:44.710086Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2021-10-05T07:49:44.710162Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.
2021-10-05T07:49:44.710272Z 0 [ERROR] [MY-010119] [Server] Aborting
So I've mapped the docker /tmp directory to the host's /tmp dir using the docker-compose volumes tag, which solved this issue but now I have another issue that I cannot solve, I literally can't find anything about this issue that works.
I suspect the IT person changed something in the system that cause this issue, but I can't find what.
2021-10-05 12:32:08+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.22-1debian10 started.
2021-10-05 12:32:08+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2021-10-05 12:32:08+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.22-1debian10 started.
2021-10-05T12:32:08.648765Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.25) starting as process 1
2021-10-05T12:32:08.656676Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-10-05T12:32:08.829920Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-10-05T12:32:08.920421Z 0 [ERROR] [MY-011300] [Server] Plugin mysqlx reported: 'Setup of socket: '/var/run/mysqld/mysqlx.sock' failed, can't create lock file /var/run/mysqld/mysqlx.sock.lock'
2021-10-05T12:32:08.921019Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060
2021-10-05T12:32:09.027024Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2021-10-05T12:32:09.027478Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-10-05T12:32:09.030560Z 0 [ERROR] [MY-010273] [Server] Could not create unix socket lock file /var/run/mysqld/mysqld.sock.lock.
2021-10-05T12:32:09.030972Z 0 [ERROR] [MY-010268] [Server] Unable to setup unix socket lock file.
2021-10-05T12:32:09.031807Z 0 [ERROR] [MY-010119] [Server] Aborting
Any kind of help would be appriciated.
I want to create a custom MySQL docker image in https://labs.play-with-docker.com/ using existing mysql file. MySQL file looks like below.
abc.sql
create schema my-schema1;
use my-schema1;
create table table1(
id bigint primary key,
name varchar(50)
);
insert into table1 values(7009009001,'Carry');
select * from table1;
create schema my-schema2;
use my-schema2;
create table table2(
id bigint primary key,
name varchar(50)
);
insert into table1 values(4009009001,'Marry');
select * from table2;
Dockerfile
FROM mysql
COPY ./abc.sql /docker-entrypoint-initdb.d/abc.sql
I am running below commands :
docker pull mysql:latest
docker build -f Dockerfile -t custom-mysql-img .
docker run --name=mysql-con --volume custom-mysql-volume:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=root -d custom-mysql-img
docker exec -it mysql-con mysql -u root -p
Container gets started and asks for password. But on executing show databases; command it only displays default schemas. I need multiple schemas and tables in my .sql file, hence don't want to put schema name in Dockerfile.
Please suggest where I am wrong.
Below is the output of docker logs mysql-con :
$ docker logs mysql-con
2021-04-18 13:16:39+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.23-1debian10 started.
2021-04-18 13:16:39+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2021-04-18 13:16:40+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.23-1debian10 started.
2021-04-18 13:16:40+00:00 [Note] [Entrypoint]: Initializing database files
2021-04-18T13:16:40.236069Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.23) initializing of server in progress as process 42
2021-04-18T13:16:40.253242Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-04-18T13:16:40.923755Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-04-18T13:16:43.583388Z 6 [Warning] [MY-010453] [Server] root#localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
2021-04-18 13:16:47+00:00 [Note] [Entrypoint]: Database files initialized
2021-04-18 13:16:47+00:00 [Note] [Entrypoint]: Starting temporary server
2021-04-18T13:16:47.959622Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.23) starting as process 87
2021-04-18T13:16:48.100393Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-04-18T13:16:48.506573Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-04-18T13:16:48.753607Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: /var/run/mysqld/mysqlx.sock
2021-04-18T13:16:49.015712Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2021-04-18T13:16:49.018919Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-04-18T13:16:49.023237Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2021-04-18T13:16:49.082436Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.23' socket: '/var/run/mysqld/mysqld.sock' port: 0 MySQL Community Server - GPL.
2021-04-18 13:16:49+00:00 [Note] [Entrypoint]: Temporary server started.
Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
2021-04-18 13:16:55+00:00 [Note] [Entrypoint]: /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/abc.sql
/usr/local/bin/docker-entrypoint.sh: line 75: /docker-entrypoint-initdb.d/abc.sql: Permission denied
2021-04-18 13:17:43+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.23-1debian10 started.
2021-04-18 13:17:43+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2021-04-18 13:17:43+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.23-1debian10 started.
2021-04-18T13:17:44.067090Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.23) starting as process 1
2021-04-18T13:17:44.082414Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-04-18T13:17:45.999169Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-04-18T13:17:46.234843Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2021-04-18T13:17:46.322310Z 0 [System] [MY-010229] [Server] Starting XA crash recovery...
2021-04-18T13:17:46.378281Z 0 [System] [MY-010232] [Server] XA crash recovery finished.
2021-04-18T13:17:46.454642Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2021-04-18T13:17:46.455015Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2021-04-18T13:17:46.459673Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2021-04-18T13:17:46.491885Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.23' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.