How to fix CSF’s error Another app is currently holding the xtables lock

The error should be looking as below:

You have an unresolved error when starting csf:
Error: Error processing command for line [339] (6 times): [Another app is currently holding the xtables lock. Perhaps you want to use the -w option?], at line 339 in /usr/sbin/csf

You need to restart csf successfully to remove this warning, or delete /etc/csf/csf.errorRead the rest

How to fix a login issue after WordPress Multisite split

The slave installation will lose users

wp user list

+—-+————+————–+————+—————–+——-+
| ID | user_login | display_name | user_email | user_registered | roles |
+—-+————+————–+————+—————–+——-+
+—-+————+————–+————+—————–+——-+

And you won’t be able to create new admin user because you don’t have appropriate MySQL tables

wp user create admin [email protected]
Read the rest

How to enable Slow Query Log

Append into /etc/my.cnf the following:

slow_query_log = 1
slow-query_log_file = /var/log/mysql-slow.log
long_query_time = 2

Create /var/log/mysql-slow.log log file and set it as mysql user:

touch /var/log/mysql-slow.log
chown mysql:mysql /var/log/mysql-slow.log

Restart MySQL server:

/scripts/restartsrv_mysql

Monitor the logs using tail command:

tail -f /var/log/mysql-slow.log
Read the rest

Mysqldump error: The user specified as a definer does not exist

Error:

mysqldump myuser_db > myuser_db.sql

mysqldump: Got error: 1449: “The user specified as a definer (‘user_db’@’localhost’) does not exist” when using LOCK TABLES

To pass this error try to use –single-transaction

mysqldump --single-transaction myuser_db > myuser_db.sql

Should be good now

Source: https://stackoverflow.com/questions/26583103/mysqldump-got-error-1449/26583311Read the rest

Enable SpamAssassin globally for all users

You can either go ahead over WHM –> Exim Configuration Manager –> Apache SpamAssassin Options –> Apache SpamAssassin™: Forced Global ON set to ON

or simply touch a file:

 touch /etc/global_spamassassin_enable

Now you have got SpamAssassin enabled for all users with default score 5

The default 5 score can be overwritten over by a user via /home/USER/.spamassassin/user_prefsRead the rest

How to rebuild named.conf file on cPanel server

You can have a lot of errors like below inside your logs which indicate a broken named.conf file

Apr 14 08:32:17 server1 pdns_server: Backend reported condition which prevented lookup (Zone for ‘sub.domain.com’ in ‘/var/named/sub.domain.com.db’ temporarily not available (file missing, or master dead)) sending out servfail

Backup your current named.conf… Read the rest