Category Archives: MySQL

wp_wfConfig too large

While debugging some bottlenecks in one of my servers…

i’v realised that one of my db queries to Wordfence tables were causing it.

Solution was to… uninstall wordfence – to clean all their tables – anda reinstall it.

After removing it 23:30, CPU usage and Load Average was a significantly reduced.

phpmyadmin – Your password does not satisfy the current policy requirements

 mysqli_query(): (HY000/1819): Your password does not satisfy the current policy requirements

I generally use the PHPMyAdmin to generate the passwords,
what I’v done in this case, but I got the following error….

SHOW VARIABLES LIKE 'validate_password%';
SET GLOBAL validate_password_policy = 0;

#1366 – Incorrect integer value: ” for column ‘upd_iid’ at row 1

While I was switching a legacy site from servers… some SQLs weren’t working…

#1366 - Incorrect integer value: '' for column 'upd_iid' at row 1

This worked for me…
I’v edited my /etc/mysql/my.cnf  and comment the original “sql_mode” and added this one

sql_mode = ""

Save and restart mysql!

live MySQL queries

On your mysql console…

mysql> SHOW VARIABLES LIKE "general_log%";

| Variable_name    | Value                      |
| general_log      | OFF                        |
| general_log_file | /var/run/mysqld/mysqld.log |

mysql> SET GLOBAL general_log = 'ON';


tail -f -n200 /var/run/mysqld/mysqld.log


After debugging… don’t forget to turn it OFF!

mysql> SET GLOBAL general_log = 'OFF';



codeigniter + php + mysql – emojis 😉

This is how…

On mysql set your table(s)’s filed(s) to utf8mb4_general_ci.

codeigniter config/database.php
$db['default']['char_set'] = 'utf8mb4';
$db['default']['dbcollat'] = 'utf8mb4_general_ci';

MySQL – compare tables and generate SQL

PHP MySql compare table structure – ONLINE!

This site can compare two MySQL database table structures and generate the necessary SQL statements to update the second table to be identical to the first.
It compares the table creation SQL statements of two MySQL databases as outputted from the mysqldump command or phpmyadmin.
The site determines what changed from one database to the other and generates schema alteration SQL statements to create, drop and alter tables that should be applied to one database to make it have the same schema of the other.