Reset the MySQL and MariaDB root password
Forgot the root password? Chances are you do not need one. And if you do: here is how to open the database for exactly one minute without handing it to half the internet.
Install MySQL and MariaDB, wire them up to Apache and PHP, and back them up automatically. A backup that was never restored is not a backup.
Forgot the root password? Chances are you do not need one. And if you do: here is how to open the database for exactly one minute without handing it to half the internet.
The socket error has five realistic causes. How to work out in five minutes which one you are dealing with, and why localhost and 127.0.0.1 are not the same thing.
A database is not secure just because the package installed cleanly. This guide walks through mysql_secure_installation, settles the unix_socket question and shows how to give every application its own database user.
Why "Access denied for user" usually has nothing to do with a wrong password: unix_socket, localhost versus 127.0.0.1, privileges and the safe root password reset.
Installation from the distribution package or the PGDG repo, first access through the postgres user, creating a database and a role, understanding pg_hba.conf and a backup that really holds up.
A small script plus a cron job is all it takes to back up every MySQL and MariaDB database in compressed form each night. Including the points where Debian and Ubuntu differ and a backup fails silently.
Apache2, PHP 8, MariaDB and phpMyAdmin on Debian 13 or Debian 12: the complete setup step by step, including hardening and troubleshooting.
Apache2, PHP 8, MySQL or MariaDB and phpMyAdmin on Ubuntu 24.04 LTS or 22.04 LTS: the complete setup step by step, including how to secure it afterwards.