Solved Unable to start mariadb114-server on fresh install

Hello. I installed mariadb114-client and mariadb114-server from pkg on FreeBSD 14.1-RELEASE-p2. Despite being a fresh install I'm unable to start mysql-server.
Running (as root) service mysql-server start shows the Starting mysql. message right after but it takes about 10 seconds for the command to finish running for some reason. Running service mysql-server status then returns mysql is not running., so there is definitely something wrong. I've tried removing /var/db/mysql but it still doesn't work after creating the directory structure automatically.

The weird thing is that I can start the server without any problems with cd /usr/local; /usr/local/bin/mysqld_safe --datadir='/var/db/mysql'. Running service -v mysql-server start doesn't show more logs and I'm unable to find anything on /var/log/messages as well. Is there anything else I should check here? Thanks.

P.S. As I have wireguard(client) running on this machine I believed that's the issue, but disabling wireguard does not help.
 
I get exactly the same issue with 114, I just went back to 1011 as the EOL dates are quite close. Maybe log a PR.
 
I get exactly the same issue with 114, I just went back to 1011 as the EOL dates are quite close. Maybe log a PR.
I see.. so it's not only me then :/
Would be great if I can find out why & submit a fix but I'm not that knowledged. (Wouldn't have really posted this question in that case lol)
In the meantime I'll also be instaling 1011..
 
After installing mariadb114-server you need to read the message of the mariadb114-server or if you miss it and need to re-read it use pkg info -D mariadb114-server
In other words you have to copy the provided example configuration file my.cnf.sample into my.cnf like this
Code:
cd /usr/local/etc/mysql/
cp my.cnf.sample my.cnf
service mysql-server enable
service mysql-server start
service mysql-server status
mysql is running as pid 2037.

Then you can edit the desire settings from /usr/local/etc/mysql/conf.d/
By default mysql-server listen only on 127.0.0.1 if you need to connect via network then change the bind-address in server.cnf
 
After installing mariadb114-server you need to read the message of the mariadb114-server or if you miss it and need to re-read it use pkg info -D mariadb114-server
Thanks a lot! For some reason starting (with service mysql-server start) is much slower(about 4 sec) than 1011(1 sec), but it's working without any other issues.
 
It depend if you open socket connection only or bind to network interface.
Startup time when you open a socket is around 1.07s
Startup time when you open a listening port and bind-address to interface is 4.09s
Startup time when you open a socket + bind-address is 4.12s

You can test it by editing server.cnf and modify comment out (socket, bind-address)

Compared the startime time with 1011 the 114 is slow to open bind-address with around 3sec.
 
First time you start it it will set up various files and tables in /var/db/mysql, this will add to the start time.

If it's an upgrade (from a previous version database to a newer) it will also take a little longer, and you'll need to run mysql_upgrade to upgrade various (system) tables.
 
First time you start it it will set up various files and tables in /var/db/mysql, this will add to the start time.

If it's an upgrade (from a previous version database to a newer) it will also take a little longer, and you'll need to run mysql_upgrade to upgrade various (system) tables.
I'm testing with a clean /var/db/mysql to make a fair comparison, and even after first table creation 114 is indeed slower to start. Though, it is working without any issues now. :)
 
Back
Top