MySQL not starting after clearing binlogs

Keywords: LAMP/MAMP/WAMP - AWS - Technical issue - Other
bnsupport ID: ee39a25a-4371-e6e6-d749-62bc347bf0de
Description:
The server was full, I deleted the binlogs, reset the binlog.index, but now the MySQL server is not starting anymore, and there are no new errors added/shown in the mysqld.log

The files listed below are bigger than 10MB and have not been included, please notify the support agent.

/opt/bitnami/apache/logs/error_log
/opt/bitnami/apache2/logs/error_log

The support bundle was uploaded successfully to the Bitnami servers. Please copy the following code:

ee39a25a-4371-e6e6-d749-62bc347bf0de

Oh, I also forgot to mention that for some reason the /opt/bitnami/mysql/etc/my.cnf suddenly disappeared, and I had to recreate it.

Here is the my.cnf file:

[mysqladmin]
user=root

[mysqld]
basedir=/opt/bitnami/mysql
datadir=/opt/bitnami/mysql/data
port=3306
socket=/opt/bitnami/mysql/tmp/mysql.sock
tmpdir=/opt/bitnami/mysql/tmp
max_allowed_packet=32M
bind-address=127.0.0.1
skip-name-resolve=1
expire_logs_days=7
character-set-server=utf8mb4
collation-server=utf8mb4_general_ci
log-error=/opt/bitnami/mysql/logs/mysqld.log

default-authentication-plugin=mysql_native_password

# InnoDB
innodb_buffer_pool_size = 8500M # This should be around 70% of your total RAM
innodb_buffer_pool_instances = 6
innodb_stats_on_metadata = 0
innodb_log_file_size = 768M # Around 15-25% of buffer-pool-size
innodb_file_per_table = 1 # Don't fragment tables across files
innodb_flush_log_at_trx_commit = 2 # Increases tracking write speed

max_connections = 200
#query_cache_type = 0 # Disable query cache, as app is write-intensive
#query_cache_size = 0

# Disable binlog
binlog_expire_logs_seconds = 86400  # 1 day
max_binlog_size = 104857600         # 100M

# innodb_force_recovery = 1

[client]
port=3306
socket=/opt/bitnami/mysql/tmp/mysql.sock
default-character-set=utf8mb4

[manager]
port=3306
socket=/opt/bitnami/mysql/tmp/mysql.sock
pid-file=/opt/bitnami/mysql/tmp/manager.pid
default-mysqld-path=/opt/bitnami/mysql/bin/mysqld.bin

Hello @XCS,

Could you please try Disabling Binary Logging In MySQL and restarting the mysql service with:

sudo /opt/bitnami/ctlscript.sh restart mysql

If the problem persists, please share the output of the following commands:

sudo tail -30 /opt/bitnami/mysql/logs/mysqld.log
sudo tail -30 /opt/bitnami/apache2/logs/error_log

Regards,
Francisco de Paz

Hi Francisco, thanks for the response!

I did try a lot of stuff, and in the end nothing worked, so I just rolled back to a previous version of the server where everything was fine.

I also have to note that not only MySQL was not starting, but I also had to run gonit after rebooting the server, otherwise the service didn’t start.

Hi @XCS,

Sorry to hear you needed to roll back to a previous version. You need to be really careful when disabling the binlog files in MySQL because it can break the server.

Let us know if you have any questions or suggestions :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.