Help Outputing MySQL General Log to Named Pipe
Every step in /var/lib/ needs to have at least 755 permissions.  That is, each directory needs to be readable and x (searchable) by user mysql.  (Technically, none of those steps should be owned by mysql, so 005 is sufficient.  However, you may find 750, which won't work.)

/var/lib/mysql/, itself needs to be owned and writable by mysql (700 or better).