A while ago (probably bookworm), I built a MySQL server and all was
well. By default, one could log in with mysql -u root and it connect
via a UNIX socket and auth. This worked well and I had no complaints.
At some point, which may or may not coincide with an upgrade to
Trixie, this stopping working. Now, when runnig mysql -u root, I'm
greeted with "ERROR 1698 (28000): Access denied for user
'root'@'localhost'"
Hey Mike,
Mini-necroposting here, but I think I ran (and have been for some time)
into the same issue you described here.
On Mon, 20 Oct 2025 16:26:02 +0100, Mike wrote:
A while ago (probably bookworm), I built a MySQL server and all was
well. By default, one could log in with mysql -u root and it connect
via a UNIX socket and auth. This worked well and I had no complaints.
At some point, which may or may not coincide with an upgrade to
Trixie, this stopping working. Now, when runnig mysql -u root, I'm
greeted with "ERROR 1698 (28000): Access denied for user 'root'@'localhost'"
I traced my issue down to someting askew with the user setup in
MyS^WMariaDB `unix_socket` auth method. I'm not sure how we got there.
However, I found that running the following command (as the `debian-sys-maint` user defined in `/etc/mysql/debian.cnf`) to update
the auth method would reset my root user to a functional state of being
able to log-in passwordlessly using the Unix socket.
alter user 'root'@'localhost' identified via unix_socket;
I'd be interested to know if that works for you, or if you found another
way to fix the issue.
| Sysop: | Jacob Catayoc |
|---|---|
| Location: | Pasay City, Metro Manila, Philippines |
| Users: | 5 |
| Nodes: | 4 (0 / 4) |
| Uptime: | 119:49:25 |
| Calls: | 125 |
| Calls today: | 125 |
| Files: | 489 |
| D/L today: |
859 files (365M bytes) |
| Messages: | 76,568 |
| Posted today: | 26 |