Error while backing up database XXX: The sql file is 0 bytes in size

jeebee123

Verified User
Joined
Feb 2, 2016
Messages
6
Hi folks!

After upgrading to MariaDB (instead of MySQL) I get this error.

Error while backing up database XXX
Error while backing up database XXX: The sql file is 0 bytes in size: /home/tmp/admin.933/admin/backup/XXX.sql
mysqldump error output: /usr/bin/mysqldump: unknown variable 'max_connections=5000'


What's the best way to fix this?

Cheers!
 
It's pretty empty...

Code:
#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d

max_connections=5000
 
Hello,

Move

Code:
 max_connections=5000

under section

Code:
[mysqld]

in /etc/my.cnf


Code:
#
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]

#
# include all files from the config directory
#

!includedir /etc/my.cnf.d

[mysqld]
max_connections=5000
 
Directadmin does not add anything of that in MySQL config.

I will need root access to SSH on your server to investigate the incident if you want to know how it happened. It will cost you some money.
 
when I backup the accounts i give this error:
Error while backing up database SQL file is 0 bytes in size

my.cnf contents:

[mysqld]
max_allowed_packet=500M
local-infile=0
innodb_file_per_table
open_files_limit=10000

read_buffer_size=2M
read_rnd_buffer_size=2M
join_buffer_size=2M
sort_buffer_size=2M
query_cache_size=64M
query_cache_limit=512K
query_cache_type=1

max_connections=300
thread_cache_size=15


innodb_buffer_pool_size = 2G
innodb_buffer_pool_instances = 10
innodb_thread_concurrency = 0
innodb_write_io_threads = 64
innodb_read_io_threads = 64
innodb_strict_mode = 'OFF'
sql_mode=""
 
when I backup the accounts i give this error:
Error while backing up database SQL file is 0 bytes in size

my.cnf contents:

[mysqld]
max_allowed_packet=500M
local-infile=0
innodb_file_per_table
open_files_limit=10000

read_buffer_size=2M
read_rnd_buffer_size=2M
join_buffer_size=2M
sort_buffer_size=2M
query_cache_size=64M
query_cache_limit=512K
query_cache_type=1

max_connections=300
thread_cache_size=15


innodb_buffer_pool_size = 2G
innodb_buffer_pool_instances = 10
innodb_thread_concurrency = 0
innodb_write_io_threads = 64
innodb_read_io_threads = 64
innodb_strict_mode = 'OFF'
sql_mode=""
maybe this makes bad impact:
innodb_strict_mode = 'OFF'
sql_mode=""
 
I wanted to add to this,

I updated DA via CustomBuild and also MariaDB to 10.4.20. I noticed at the end of the log, a similar message:


Code:
2021-07-01 09:33:56 (27.3 MB/s) - 'mariadb-10.4.20-linux-glibc_214-x86_64.tar.gz' saved [1151914821/1151914821]
mv: 'mariadb-10.4.20-linux-glibc_214-x86_64.tar.gz' and '/usr/local/mariadb-10.4.20-linux-glibc_214-x86_64.tar.gz' are the same file
tar: write error
Stopping mysqld ...
Ensuring local-infile is disabled for security reasons in MySQL configuration file...
Giving mysqld a few seconds to start up...
Giving mysqld a another few seconds to start up...
Giving mysqld last 20 seconds to start up...
/usr/local/mysql/bin/mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) when trying to connect
FATAL ERROR: Upgrade failed
[1mError running '/usr/local/mysql/bin/mysql_upgrade --defaults-extra-file=/usr/local/directadmin/conf/my.cnf --skip-version-check'(B[m
Restarting MySQL.
Installation completed.
 
Please do not update ancient post and do not doublepost.

You have a specific other problem, create your own post for it.

In this case, please follow this topic:
or leave that topic alone and keep your info gathered here.
 
I wanted to add to this,

I updated DA via CustomBuild and also MariaDB to 10.4.20. I noticed at the end of the log, a similar message:


Code:
2021-07-01 09:33:56 (27.3 MB/s) - 'mariadb-10.4.20-linux-glibc_214-x86_64.tar.gz' saved [1151914821/1151914821]
mv: 'mariadb-10.4.20-linux-glibc_214-x86_64.tar.gz' and '/usr/local/mariadb-10.4.20-linux-glibc_214-x86_64.tar.gz' are the same file
tar: write error
Stopping mysqld ...
Ensuring local-infile is disabled for security reasons in MySQL configuration file...
Giving mysqld a few seconds to start up...
Giving mysqld a another few seconds to start up...
Giving mysqld last 20 seconds to start up...
/usr/local/mysql/bin/mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) when trying to connect
FATAL ERROR: Upgrade failed
[1mError running '/usr/local/mysql/bin/mysql_upgrade --defaults-extra-file=/usr/local/directadmin/conf/my.cnf --skip-version-check'(B[m
Restarting MySQL.
Installation completed.
my DA version: 1.62.2
Database version: 10.4.20
 
Again, please don't post in 2 threads and go over to the other one. Also for people helping you it's confusing working in two threads.
 
Back
Top