You cannot (absolutely cannot) replace the filesystem pipe /var/run/mysqld/mysql.sock
with a regular file. You need to use mkfifo(1)
to create the pipe(7)
that clients use to communicate with the mysql server.
The (13)
probably also means that you have a permission denied error return, EACCES
(which usually has the decimal value 13
-- yes, I've seen it a lot).
If the file system permissions are configured correctly, you might be having accesses rejected by a mandatory access control tool such as AppArmor, SELinux, TOMOYO, or SMACK.
AppArmor comes pre-installed on Ubuntu systems by default, and might be rejecting access to the pipe. Check /var/log/syslog
, /var/log/audit/audit.log
or dmesg(1)
output for messages that look something like this:
type=AVC msg=audit(1320723925.179:45115): apparmor="DENIED"
operation="open" parent=1 profile="/usr/sbin/ntop"
name="/usr/share/ntop/html/PlotKit/excanvas.js" pid=1835 comm="ntop"
requested_mask="r" denied_mask="r" fsuid=122 ouid=0
(But with name=/var/run/mysqld/mysql.sock
instead.)
If you have error messages like this, run aa-logprof
as root
and answer the questions. More information on configuration AppArmor can be found in the apparmor.d(5)
manpage, or some various wiki pages.