[mythtv-users] Upgraded the Ubuntu 11.10 and not Myth can't connect to MySQL
Robert Longbottom
rongblor at googlemail.com
Sun Nov 6 17:07:49 UTC 2011
On 06/11/2011 14:01, Damian wrote:
> On 05/11/2011 21:24, mythtv-users-request at mythtv.org wrote:
<snip>
> Thanks for talking me though this. Here's the latest, following your
> instructions:
>
> damian at MythBox:~$ ls -la /var/run/mysqld
> total 0
> drwxr-xr-x 2 mysql root 40 2011-11-05 11:04 .
> drwxr-xr-x 26 root root 1000 2011-11-05 11:04 ..
>
> damian at MythBox:~$ cd /var/run
> damian at MythBox:/var/run$ sudo chown -R mysql:mysql mysqld
>
> damian at MythBox:/var/run$ ls -la /var/run/mysqld
> total 0
> drwxr-xr-x 2 mysql mysql 40 2011-11-05 11:04 .
> drwxr-xr-x 26 root root 1000 2011-11-05 11:04 ..
>
<snip>
> damian at MythBox:/var/log/mysql$ sudo service mysql start
> mysql start/running
>
> damian at MythBox:/var/log/mysql$ ps ax |grep -i mysql
> 30457 pts/1 S+ 0:00 grep -i mysql
>
> damian at MythBox:/var/log/mysql$ cat /var/log/mysql/*.err /var/log/mysql/*.log
> cat: /var/log/mysql/*.err: No such file or directory
> 111106 13:42:33 [Note] Plugin 'FEDERATED' is disabled.
> 111106 13:42:33 InnoDB: Initializing buffer pool, size = 8.0M
> 111106 13:42:33 InnoDB: Completed initialization of buffer pool
> 111106 13:42:33 InnoDB: Started; log sequence number 0 20263543
> 111106 13:42:33 [ERROR] Can't start server : Bind on unix socket:
> Permission denied
> 111106 13:42:33 [ERROR] Do you already have another mysqld server
> running on socket: /var/run/mysqld/mysqld.sock ?
> 111106 13:42:33 [ERROR] Aborting
Here is the (first) problem - looks like the mysql user can't write to
/var/run/mysqld/, which is odd, because based on what you did above I
would have thought it should be able to.
I think I'd grant everyone access to write to /var/run/mysqld by running
chmod o+w /var/run/mysql
Delete the log file again. Start the service and see what happens. If
it works, see what files are created in /var/run/mysqld and who owns
them. Then fix up the permissions so that you don't need to give global
write access.
It looks like your filesystem permissions have been messed up somehow.
> damian at MythBox:/var/log/mysql$ ls -la /var/run/mysqld
> total 0
> drwxr-xr-x 2 mysql mysql 40 2011-11-05 11:04 .
> drwxr-xr-x 26 root root 1000 2011-11-05 11:04 ..
>
> damian at MythBox:/var/log/mysql$ ls -la /var/log/mysql
> total 12
> drwxr-s--- 2 mysql adm 4096 2011-11-06 13:42 .
> drwxr-xr-x 22 root root 4096 2011-11-06 07:40 ..
> -rw-rw---- 1 mysql adm 1326 2011-11-06 13:43 error.log
>
> damian at MythBox:/var/log/mysql$ ls -la /var/lib/mysql
> ls: cannot open directory /var/lib/mysql: Permission denied
>
> damian at MythBox:/var/log/mysql$ ls -la /etc/mysql
> total 36
> drwxr-xr-x 3 root root 4096 2011-10-29 17:59 .
> drwxr-xr-x 209 root root 12288 2011-11-05 11:04 ..
> drwxr-xr-x 2 root root 4096 2011-11-01 23:30 conf.d
> -rw------- 1 root root 312 2008-11-11 14:23 debian.cnf
> -rwxr-xr-x 1 root root 1220 2011-07-25 22:27 debian-start
> -rw-r--r-- 1 root root 3701 2011-10-29 17:59 my.cnf
> -rw-r--r-- 1 root root 3608 2010-10-22 21:01 my.cnf~
>
> Does that help?
>
> I feel like we're getting somewhere, but I've thought that before :-)
>
> Damian
More information about the mythtv-users
mailing list