HELP! mysql-server broken on FreeBSD 13 Release p12

0 views
Skip to first unread message

William Dudley

unread,
Apr 27, 2026, 4:12:05 PMApr 27
to ques...@freebsd.org
During a recent pkg upgrade, pkg uninstalled my mysql server.  I saw that, but I figured
that some other thing had happened so I'd still have mysql running.  HAH!
I rebooted the machine last night, and the running instance of mysql80-server
obviously disappeared.

I installed mysql84-server, but it fails, and mysql-client complains:
ERROR 1524 (HY000): Plugin 'mysql_native_password' is not loaded
The fix for this seems to involve having a running mysql server.

I tried installing mysql80-server, which is what was running before.  Install happened,
but running it fails silently.  Running from a shell (as opposed to from /usr/local/etc/c.d/mysql-server) just fails with no output to terminal, no running server.

How do I get mysql running again?

Thanks,
Bill Dudley
This email is free of malware because I run Linux.

Dan Mahoney (Ports)

unread,
Apr 27, 2026, 4:25:00 PMApr 27
to William Dudley, ques...@freebsd.org


> On Apr 27, 2026, at 1:10 PM, William Dudley <wfdu...@gmail.com> wrote:
>
> During a recent pkg upgrade, pkg uninstalled my mysql server. I saw that, but I figured
> that some other thing had happened so I'd still have mysql running. HAH!
> I rebooted the machine last night, and the running instance of mysql80-server
> obviously disappeared.
>
> I installed mysql84-server, but it fails, and mysql-client complains:
> ERROR 1524 (HY000): Plugin 'mysql_native_password' is not loaded
> The fix for this seems to involve having a running mysql server.

This is a version of password authentication that's going away in future versions of MySQL and did not survive the fork to MariaDB, and is presently off by default. If you don't have your database passwords and cannot re-password them, at least mysql84 and earlier have this option you can set in my.cnf, but this is a compatibility shim and you should move to something newer as soon as you can.

Try this, and see what's in your error log after?

[mysqld]
mysql_native_password=ON

-Dan

Christos Chatzaras

unread,
Apr 27, 2026, 4:29:37 PMApr 27
to William Dudley, ques...@freebsd.org
Before doing anything else, make a backup copy of the current MySQL datadir, for example:

service mysql-server stop
cp -fr /var/db/mysql /var/db/mysql.backup-before-84-retry

If MySQL 8.4 has already started and upgraded the internal data dictionary/system tables, then you will not be able to use the same datadir with MySQL 8.0 again.

Try reinstalling MySQL 8.4 and add the following option to your my.cnf file:

[mysqld]
mysql-native-password=ON

Then run:

service mysql-server start

If it still does not start, check the MySQL error log:

tail -n 100 /var/db/mysql/*.err

William Dudley

unread,
Apr 27, 2026, 4:51:15 PMApr 27
to Christos Chatzaras, fre...@gushi.org, ques...@freebsd.org
I have good nightly backups, so that's covered.  Good thing, since I couldn't run the server.

I turned on the native password hack, so now the server is running and I can talk to it.

So, disaster averted.  The problem occurred because p5-Class-DBI-mysql and/or
p5-DBD-mysql-5.008 are incompatible with mysql80-server.  So FreeBSD pkg just
helpfully nuked my mysql server rather than raise a BIG ALARM.

Next: change the password mechanism to whatever replaces mysql-native-password.
Suggestions on that welcomed.

Bill Dudley
This email is free of malware because I run Linux.

Dan Mahoney (Ports)

unread,
Apr 27, 2026, 5:34:41 PMApr 27
to William Dudley, Christos Chatzaras, ques...@freebsd.org


> On Apr 27, 2026, at 1:47 PM, William Dudley <wfdu...@gmail.com> wrote:
>
> I have good nightly backups, so that's covered. Good thing, since I couldn't run the server.
>
> I turned on the native password hack, so now the server is running and I can talk to it.
>
> So, disaster averted. The problem occurred because p5-Class-DBI-mysql and/or
> p5-DBD-mysql-5.008 are incompatible with mysql80-server. So FreeBSD pkg just
> helpfully nuked my mysql server rather than raise a BIG ALARM.

This is not my first time complaining about the fact that a very simple shim package like p5-DBD-myxxx should not require that you build a custom port for this, and should not force a major DB version upgrade.

The complication comes with things that *depend* on that version of the shim package. (My example was with p5-RT50, which does not directly depend on any database package, but when you install p5-DBD-Pg, that forces you to whatever the default version of postgres is, which changes about once a year).

I'll note that there probably should have been a note about this password incompatibility in /usr/ports/UPDATING. I'd also still love it if pkg updating had some magic way to fetch things affected by only your current ports and display them. Right now, it depends on having a checked out ports tree, which...defeats the point of using pkg?

While I'm ranting: if you fix this by pkg locking your DB server package, pkg is completely silent about not touching those locked versions.

Anyway, glad you're up and running again.

-Dan
Reply all
Reply to author
Forward
0 new messages