The next thing I'd do is look at the error log (more info). This might be at /var/log/mysql/error.log or /var/log/mysql/mariadb.err It's possible that it's not set (and you need to set it). To know where it is (and assuming you cannot run queries because you cannot start the database) you could do something like this:
find /etc/mysql -type f -exec grep log_error {} \;
On my server it looks like this:
# find /etc/mysql -type f -exec grep log_error {} \;
log_error = /var/log/mysql/error.log
skip_log_error
So I know that it is on /var/log/mysql/error.log
If this error log is not explicit enough the next thing I'd do is start the database using mysqld_safe or mariadbd-safe (more info). On my server it looks like this:
# mysqld_safe
230215 09:23:28 mysqld_safe Logging to syslog.
230215 09:23:28 mysqld_safe Starting mariadbd daemon with databases from /var/lib/mysql
And if I check syslog:
# grep mysqld /var/log/syslog
Feb 15 09:23:28 birch mysqld_safe: Starting mariadbd daemon with databases from /var/lib/mysql
Feb 15 09:23:28 birch mysqld: 2023-02-15 9:23:28 0 [Note] /usr/sbin/mariadbd (mysqld 10.5.12-MariaDB-0+deb11u1-log) starting as process 2035918 ...
Feb 15 09:23:28 birch mysqld: 2023-02-15 9:23:28 0 [Note] InnoDB: Uses event mutexes
Feb 15 09:23:28 birch mysqld: 2023-02-15 9:23:28 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
Feb 15 09:23:28 birch mysqld: 2023-02-15 9:23:28 0 [Note] InnoDB: Number of pools: 1
Feb 15 09:23:28 birch mysqld: 2023-02-15 9:23:28 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
Feb 15 09:23:28 birch mysqld: 2023-02-15 9:23:28 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
Feb 15 09:23:28 birch mysqld: 2023-02-15 9:23:28 0 [Note] InnoDB: Using Linux native AIO
Feb 15 09:23:28 birch mysqld: 2023-02-15 9:23:28 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
Feb 15 09:23:28 birch mysqld: 2023-02-15 9:23:28 0 [Note] InnoDB: Completed initialization of buffer pool
Feb 15 09:23:28 birch mysqld: 2023-02-15 9:23:28 0 [Note] InnoDB: 128 rollback segments are active.
Feb 15 09:23:28 birch mysqld: 2023-02-15 9:23:28 0 [Note] InnoDB: Creating shared tablespace for temporary tables
Feb 15 09:23:28 birch mysqld: 2023-02-15 9:23:28 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
Feb 15 09:23:28 birch mysqld: 2023-02-15 9:23:28 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
Feb 15 09:23:28 birch mysqld: 2023-02-15 9:23:28 0 [Note] InnoDB: 10.5.12 started; log sequence number 134979417; transaction id 120284
Feb 15 09:23:28 birch mysqld: 2023-02-15 9:23:28 0 [Note] Plugin 'FEEDBACK' is disabled.
Feb 15 09:23:28 birch mysqld: 2023-02-15 9:23:28 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
Feb 15 09:23:28 birch mysqld: 2023-02-15 9:23:28 0 [Note] Server socket created on IP: '0.0.0.0'.
Feb 15 09:23:28 birch mysqld: 2023-02-15 9:23:28 0 [Note] Reading of all Master_info entries succeeded
Feb 15 09:23:28 birch mysqld: 2023-02-15 9:23:28 0 [Note] Added new Master_info '' to hash table
Feb 15 09:23:28 birch mysqld: 2023-02-15 9:23:28 0 [Note] /usr/sbin/mariadbd: ready for connections.
Feb 15 09:23:28 birch mysqld: Version: '10.5.12-MariaDB-0+deb11u1-log' socket: '/run/mysqld/mysqld.sock' port: 3306 Debian 11
Feb 15 09:23:28 birch mysqld: 2023-02-15 9:23:28 0 [Note] InnoDB: Buffer pool(s) load completed at 230215 9:23:28
Feb 15 09:24:20 birch mysqld: 2023-02-15 9:24:20 4 [Note] Start binlog_dump to slave_server(3), pos(mysql-bin.000006, 342), using_gtid(0), gtid('')
To stop mysqld_safe you'd need to run:
# mysqladmin -p shutdown
Enter password: