Searching the web for that error message seems to suggest it's a problem with permissions or wrong user. Maybe it's the permissions on your tmpdir (/var/db/mysql_tmpdir)? I think that should probably have the same ownership and permissions as your datadir (/var/db/mysql).
You can read about...
$ service mysql-server status
mysql is not running.
$ service mysql-server start
/usr/local/etc/rc.d/mysql-server:WARNING:failedprecmdroutineformysql
$
Precisely!
I can't create a user because I cannot log in.
I cannot log in because mysql will not start.
root@ellamay:/ # service mysql-server start
/usr/local/etc/rc.d/mysql-server:WARNING:failedprecmdroutineformysql
root@ellamay:/ #
I give up!
I will remove and reinstall mysql.
Think I've hit the same issue (too late to help the OP, but might help future searchers!) - look here: https://forums.freebsd.org/threads/error-adding-new-user-pw-user-anne-disappeared-during-update.59525/#post-487252
I came here with the same problem. It was the first search result. It didn't help.
I went to the second search result. That helped.
From my own blog post earlier this year:
This loses your configuration and your data.
sudo pkg delete mysql57-server
sudo rm -rf /usr/local/etc/mysql
sudo rm...
1. Done, I've commented both out.
a. I tried this, I'm still getting "/usr/local/etc/rc.d/mysql-server:WARNING:failedprecmdroutineformysql" with no logs generated.
I decided to try running mysql_safe directly to see if I could find out what the problem is, and got this in...
...This time, there was a change, running that as superuser also caused "/usr/local/etc/rc.d/mysql-server:WARNING:failedprecmdroutineformysql"
So I tried creating the directories that were deleted earlier and my guess for what the log dir was, and set the owner to mysql, but the same issue...
...it prints "Starting mysql."
If I run it as a regular user, it prints "/usr/local/etc/rc.d/mysql-server:WARNING:failedprecmdroutineformysql"
After running it either way, when I run service mysql-server status, it prints "mysql is not running."
So, next I checked the contents of...
Do you have anything else in my.cnf? Because it looks like that could be the cause of your problems. Try moving that file out of the way (rename it) and then try starting MySQL again.
Also: if you tried to start MySQL with the log entries I shared (I do assume that you uncommented them by...
...# service mysql-
server start
/usr/local/etc/rc.d/mysql-server:WARNING:failedprecmdroutineformysql
root@VM_0_11_freebsd:/usr/ports/databases/mysql80-server # service mysql-
server start
/usr/local/etc/rc.d/mysql-server:WARNING:failedprecmdroutineformysql...
I have same issue in jail.
jail # service mysql-server start
/usr/local/etc/rc.d/mysql-server:WARNING:failedprecmdroutineformysql
It makes zero-size file at mysql_dbdir.
jail # ls -alg
total 8
drwxr-xr-x 2 mysqlmysql 512 Oct 17 09:44 .
drwxr-xr-x 5 root wheel 512 Jun 8 17:07 ...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.