TECH / ARCHIVE

Servers & Websites

TECH / Servers & Websites 2 min

How to Convert MyISAM Tables to Aria in MariaDB

Years ago we migrated our sites from MySQL to MariaDB and quickly decided to move legacy MyISAM tables over to the crash-safe Aria storage engine. Unlike MyISAM, Aria uses transactional logging and page checksums, making it far more resilient after unexpected power loss or server reboots.

MariaDB logo

Below are two clean ways to batch-convert all MyISAM tables to Aria: pure SQL right from the console (the safest route) and a modernized PHP 8 mysqli script.

Read full article →

TECH / Servers & Websites 4 min

How to Install PHP 7.3 on Debian 9: the Sury Repository, Modules and Switching Your Site

Debian 9 installs PHP 7.0 by default. That’s already good: according to the PHP developers, PHP 7 is up to twice as fast as PHP 5.6, and you could stop right there.

But you always want more, don’t you? And there is a way!

PHP logo – the elephant

You can install PHP 7.1, 7.2 or 7.3, and it’s version 7.3 that gives the best speed. Besides, official support for PHP 7.0 already ended on 10 January 2019.

Read full article →

TECH / Servers & Websites 4 min

WordPress Stopped Resizing Images to 600 px: the PHP GD Module Was Missing

At some point, after all my optimization and speed-up work on the blog, I noticed that WordPress had stopped resizing uploaded photos to 600 px and the other standard sizes: only the original ended up in the media library.

WordPress logo: fixing image resizing

I uploaded the sizes I needed by hand a few times and realized that wasn’t going to work – it had to be fixed. The cause turned out to be simple: after the switch to PHP 7.3, the server had no module for working with images.

Read full article →

TECH / Servers & Websites 4 min

mysqli_real_connect(): (HY000/1698): Access denied for user ‘root’@’localhost’ – How to Fix

Debian 9, phpMyAdmin 4.9. Instead of installing phpMyAdmin from packages, we just unpack it from the archive, log in to the empty database as root for the first time and get an error:

mysqli_real_connect(): (HY000/1698):
Access denied for user 'root'@'localhost'

In short: on Debian and Ubuntu, the MariaDB/MySQL root user logs in by default not with a password but through the socket – by the operating system user name (the unix_socket or auth_socket plugin). From the console as root everything works, but phpMyAdmin runs as www-data, so the server rejects it. The fix is to create a separate user with a password for phpMyAdmin or to set a password for root.

Debian: error 1698 Access denied for user root in phpMyAdmin

Below: why it happens, two proper solutions, and the old method that many people still recommend even though it is unsafe.

Read full article →