V
V
Vincent12015-12-21 04:30:10
FreeBSD
Vincent1, 2015-12-21 04:30:10

Resolved: Accidentally changed ownership of all Freebsd files - mysql won't start. How to fix?

Accidentally did chown -R root:wheel * on all files on the server. Now mysql does not start, no errors are written to the console. I wanted to reinstall mysql but got an error too. Here is an excerpt from the end of the log:

===>  Cleaning for pkg-1.6.2
pkg-static: /var/db/pkg wrong user or group ownership (expected 0/0 versus actual 88/88)
pkg-static: /var/db/pkg wrong user or group ownership (expected 0/0 versus actual 88/88)
You are about to convert your system to pkg while you have ports/packages
installed with the old pkg_install tools.

To switch to pkg:
    1) Install ports-mgmt/pkg
       cd ports-mgmt/pkg && make UPGRADEPKG=1 install clean
    2) Convert your package database by running pkg2ng

*** Error code 1

Stop in /usr/ports/ports-mgmt/pkg.

===>>> make build failed for ports-mgmt/pkg
===>>> Aborting update

===>>> Update for ports-mgmt/pkg failed
===>>> Aborting update

===>>> Update for archivers/lzo2 failed
===>>> Aborting update

===>>> Update for archivers/libarchive failed
===>>> Aborting update

===>>> Update for cmake-2.8.11.2 failed
===>>> Aborting update

Terminated

In mysql-error.log
151221  9:45:58 [ERROR] Can't start server : Bind on unix socket: Address already in use

___________________________________
Solution: rm /tmp/mysql.sock
and restart mysql.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question