Rostyslav Rava - Personal Website

Recent Posts

Set an ext4 partition label

By default, partitions in /etc/fstab are referenced by UUID.

UUID=a141d416-dbc6-4b4e-9095-24b3f48eab6d / ext4 errors=remount-ro,noatime 0 1

The correspondence between a UUID and a block device can be seen under the path /dev/disk/by-uuid/:

ls -la /dev/disk/by-uuid/a141d416-dbc6-4b4e-9095-24b3f48eab6d

The output is a symbolic link to the block device:

a141d416-dbc6-4b4e-9095-24b3f48eab6d -> ../../sda2

UUIDs are used because block device paths are not stable. After an additional drive is installed, a partition that was /dev/sdb may appear as /dev/sdc. Referencing partitions by UUID or LABEL avoids confusion and reduces the risk of data loss.

How to Change a User Password in MySQL

Changing a MySQL user password is always a good idea. It is often done periodically for credential rotation. It can also respond to compromised credentials, for example, when a password is committed by mistake to a code repository.

First, identify the user whose password needs to be changed. In MySQL, users are identified by a username and the host from which they are allowed to connect. In most cases, the host is % (any host) or localhost.

Configure a local HTTP proxy to a Java application with Apache on Ubuntu 26.04 LTS

Suppose the local development app is served on the domain application.local, with the following entry in /etc/hosts:

127.0.0.1 application.local

Usually a web-based Java application runs on port 8080, with a local URL like http://application.local:8080/.

To reach that app at http://application.local without the port, configure Apache as a reverse proxy. Create a virtual host file under /etc/apache2/sites-available/, for example application.conf, with the following content:

<VirtualHost *:80>
    ServerName application.local
    ProxyRequests Off
    ProxyPreserveHost On
    ProxyPass / http://127.0.0.1:8080/
    ProxyPassReverse / http://127.0.0.1:8080/
</VirtualHost>

ProxyPreserveHost On forwards the browser’s Host header (application.local) to the backend instead of 127.0.0.1:8080. That usually matches what Java apps expect for host-based routing, redirects, and generated URLs. If something breaks, try removing this line or set ProxyPreserveHost Off so the backend sees the origin it was configured for.

How to fix MySQL APT EXPKEYSIG B7B3B788A8D3785C

When attempting to upgrade packages from the MySQL APT repository:

sudo apt update

The error below may appear when you run sudo apt update.

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://repo.mysql.com/apt/ubuntu focal InRelease: The following signatures were invalid: EXPKEYSIG B7B3B788A8D3785C MySQL Release Engineering <mysql-build@oss.oracle.com>
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease  Connection failed [IP: 2a06:bc80:0:1000::17 80]
W: Failed to fetch http://repo.mysql.com/apt/ubuntu/dists/focal/InRelease  The following signatures were invalid: EXPKEYSIG B7B3B788A8D3785C MySQL Release Engineering <mysql-build@oss.oracle.com>

The cause is an expired signing key. The quickest fix is to reinstall the MySQL APT configuration package (mysql-apt-config). Download the .deb from MySQL’s APT repository.

How to Install MySQL 8.4 on RHEL 7

While both Red Hat Enterprise Linux and Ubuntu are Linux systems, the installation process for MySQL from the YUM repository is completely different from what was described earlier for MySQL on Ubuntu. Although RHEL 7 reached end of maintenance on June 30, 2024, it will still be under Extended Life Cycle Support until May 31, 2029. That is more than three years away, which makes it a suitable option for legacy bare-metal servers that list it as a supported operating system.