MySql Query cache on Windows

Slow server? Check if your query cache is set by querying:

mysql> show variables like 'have_query_cache';
 +------------------+-------+
 | Variable_name | Value |
 +------------------+-------+
 | have_query_cache | NO  |
 +------------------+-------+

How to enable this?
Find your my.ini … in my case in: C:\ProgramData\MySQL\MySQL Server 8.0
Add under [mysqld]

query_cache_size = 268435456
query_cache_type=1
query_cache_limit=1048576

More info here: https://dev.mysql.com/doc/refman/5.6/en/query-cache-configuration.html
And as you will notice this is 5.6 documentation. In my case this does not work, because I am using MySQL8.0 …. The query cache is deprecated as of MySQL 5.7.20, and is removed in MySQL 8.0.

The search to speed up my server continues….

MySQL user not connecting

Problem:
Windows Server 2016, IIS Website, Setup a MySQL server/database, setup a WordPress website, quickly connect with root and root-password. Everything works fine!

Now you want things more secured, so you add a MySQL user with a password and rights to only the wordpress database. Change wp-config.php with the new login and you get a “Error Establishing a Database Connection” when accessing the WordPress website or admin.

Change back to root and the problem is solved. How to fix this?

Continue reading MySQL user not connecting