For the first time I've looked deeply into the email received for the daily backups and found some errors (marked the errors in Red):
---
mysqldump: unknown variable 'local-infile=0'
Database Backup: dbb_dba --> /backup/mysql/daily//dbb_dba.sql
mysqldump: unknown variable 'local-infile=0'
Database Backup: dbb_dbb --> /backup/mysql/daily//dbb_dbb.sql
mysqldump: unknown variable 'local-infile=0'
Database Backup: dbb_dbc --> /backup/mysql/daily//dbb_dbc.sql
mysqldump: unknown variable 'local-infile=0'
Database Backup: dbb_dbd --> /backup/mysql/daily//dbb_dbd.sql
mysqldump: unknown variable 'local-infile=0'
Database Backup: dbb_dbe --> /backup/mysql/daily//dbb_dbe.sql
mysqldump: unknown variable 'local-infile=0'
Database Backup: dbb_dbf --> /backup/mysql/daily//dbb_dbf.sql
mysqldump: unknown variable 'local-infile=0'
Database Backup: dbb_dbg --> /backup/mysql/daily//dbb_dbg.sql
Skipping database: information_schema.
mysqldump: unknown variable 'local-infile=0'
Database Backup: dbb_dbh --> /backup/mysql/daily//dbb_dbh.sql
mysqldump: unknown variable 'local-infile=0'
Database Backup: mysql --> /backup/mysql/daily//mysql.sql
mysqldump: unknown variable 'local-infile=0'
Database Backup: oauthv2 --> /backup/mysql/daily//oauthv2.sql
mysqldump: unknown variable 'local-infile=0'
Database Backup: performance_schema --> /backup/mysql/daily//performance_schema.sql
mysqldump: unknown variable 'local-infile=0'
Database Backup: postfix --> /backup/mysql/daily//postfix.sql
mysqldump: unknown variable 'local-infile=0'
Database Backup: root_cwp --> /backup/mysql/daily//root_cwp.sql
mysqldump: unknown variable 'local-infile=0'
Database Backup: roundcube --> /backup/mysql/daily//roundcube.sql
mysqldump: unknown variable 'local-infile=0'
Database Backup: dbb_dbi --> /backup/mysql/daily//dbb_dbi.sql
warning: /var/tmp/rpm-tmp.RpBiRK: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEYerror: Failed dependencies:
perl(DBD::mysql) >= 1.0 is needed by percona-toolkit-2.2.16-1.noarch
---
Any idea what might be wrong?
What is output of
cat /etc/my.cnf
Did you added local-infile=0 under [mysqld] so it would look like
[mysqld]
local-infile=0
cat /etc/my.cnf:
[xxx@cwp ~]# cat /etc/my.cnf
#
# 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
#
# Disable LOAD DATA LOCAL commands in MySQL
#
local-infile=0
As you can see, the local-infile=0 is there...
You didnt read my whole reply. i told you it should be under [mysqld]
Also when you added local-infile=0 you didnt restart mysql?
so now added it under [mysqld]
Quote#
# 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
#
# Disable LOAD DATA LOCAL commands in MySQL
#
[mysqld]
local-infile=0
Also dont forget to restart mysql
Quote from: bullten on September 03, 2018, 12:15:02 PM
You didnt read my whole reply. i told you it should be under [mysqld]
Sorry. I'm quite new to VPS in general and CWP in particular. I thought that's what you meant.
Quote from: bullten on September 03, 2018, 12:15:02 PM
Also when you added local-infile=0 you didnt restart mysql?
so now added it under [mysqld]
Quote#
# 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
#
# Disable LOAD DATA LOCAL commands in MySQL
#
[mysqld]
local-infile=0
Also dont forget to restart mysql
I don't really know. I only follow tutorials. Though I'm quite sure I made a server restart 2 days ago...
I will change according to your guidance, restart mysql and will keep an eye on further emails hopping it'll be resolved.
Thanks!
Well you can replicate the issue easily.
in /etc/my.cnf file remove [mysqld] and restart mysql. See if it starts.
Yes. It does restart!
what is output of
mysqldump
Does it gives same warning like you mentioned above?
Sorry, what exactly should I have to run? :-[
make /etc/my.cnf to look like below as I comment out [mysqld]
nano /etc/my.cnf
Quote
#
# 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
#
# Disable LOAD DATA LOCAL commands in MySQL
#
# [mysqld]
local-infile=0
restart mysql
service mysqld restartDoes it restart?
run the command below
mysqldumpDoes the above command gives same warning as you mentioned in the first thread.
Oh, this time it doesn't restart (I was using the restart button in CWP's dashboard before that, and I didn't get an error then).
Running service mysqld status after the restart command resolves in "ERROR! MariaDB is not running".
And mysqldump resolves in " unknown variable 'local-infile=0' " indeed.
I'll uncomment the [mysqld] and restart mysql again.
But... how come my wordpress sites are working then if the mysql is not running?
Oh, damn... I've uncommented the [mysqld], saved the file and restarted mysqld.
But the status still shows the error message (though mysqldump doesn't).
Adding that line I think you didnt restart mysql and thats why it happened.
by uncommenting [mysqld] and restarting through ssh did it give any error?
The last time I did it through SSH.
I still get the same error that MariaDB is not running. :(
stop mysql
service mysqld stop
service mysql stop
Now start from cwp gui
Still the same. :(
what does below command shows
service mysqld status
As before:
ERROR! MariaDB is not running
what is output of
mysqlcheck
[root@cwp ~]# mysqlcheck
You forgot to give the arguments! Please see mysqlcheck --help
for more information.
what is final output of
service mysqld start
[root@cwp ~]# service mysqld start
Starting mysqld (via systemctl): [ OK ]
[root@cwp ~]# service mysqld status
ERROR! MariaDB is not running
what does centos web panel gui says?
Hmmmm my bad you are running centos 7 and mariadb
start
systemctl start mariadb.service
stop
systemctl stop mariadb.service
restart
systemctl restart mariadb.service
status
systemctl status mariadb.service
I was wondering why we're using the mysql command, but I thought - hey, I know nothing, I better shut up. :)
Well, yeah it seems it all works (all that time everything was Green in CWP dashboard).
Here's the status:
Active: active (running) since Mon 2018-09-03 21:04:47 IDT; 5s ago
So, I'm good? No need to panic? Do I have to change anything in /etc/my.cnf (remember we've added [mysqld] ?).
Yes my fault, agreed
Yes everything is fine as long as there is green light in GUI of CWP.
Thank you, dear bullten.
Yet, I'm still getting the following error in the log sent by email for daily backups:
warning: /var/tmp/rpm-tmp.VFyLyO: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEYerror: Failed dependencies: perl(DBD::mysql) >= 1.0 is needed by percona-toolkit-2.2.16-1.noarch
yum install perl-DBI -y
Already installed :(
Maybe perl needs mysql while I have MariaDB?
[root@cwp ~]# yum install perl-DBI -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 31 kB 00:00
* base: mirror.ratiokontakt.de
* epel: mirror.wiuwiu.de
* extras: mirror.ratiokontakt.de
* remi-safe: mirror.23media.de
* updates: mirror.ratiokontakt.de
base | 3.6 kB 00:00
cwp | 2.9 kB 00:00
extras | 3.4 kB 00:00
mariadb | 2.9 kB 00:00
remi-safe | 2.9 kB 00:00
updates | 3.4 kB 00:00
varnishcache_varnish5/x86_64/signature | 836 B 00:00
varnishcache_varnish5/x86_64/signature | 1.0 kB 00:00 !!!
varnishcache_varnish5-source/signature | 836 B 00:00
varnishcache_varnish5-source/signature | 1.0 kB 00:00 !!!
Package perl-DBI-1.627-4.el7.x86_64 already installed and latest version
Nothing to do
You need to find out from where it is generating.
We dont usually use backup for cwp servers but today used it on one server and it gave the error as you mentioned error. Below is its resolution
yum install perl-DBD-MySQL -y
rpm -Uvh http://dl1.centos-webpanel.com/files/mysql/percona-toolkit.rpm
Rerun the backup and it will be fine now.
/usr/local/cwp/php71/bin/php -d max_execution_time=1000000 -q /usr/local/cwpsrv/htdocs/resources/admin/include/cron_backup.php
Wow, bulletn, thank you so much for thinking of me!!!
Well, I did get this:
Database Backup: oauthv2 --> /backup/mysql/daily//oauthv2.sql
mysqldump: Got error: 1142: "SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'accounts'" when using LOCK TABLES
Database Backup: performance_schema --> /backup/mysql/daily//performance_schema. sql
http://forum.centos-webpanel.com/backup/mysqldump-got-error-1142-'select-lock-tables/msg19058/#msg19058