mysql [ERROR] Can't create IP socket: Permission denied

weixin_33912246發表於2016-09-27
/***************************************************************************
 *       mysql [ERROR] Can't create IP socket: Permission denied
 * 說明:
 *     在嵌入式方面的,這種許可權問題還是挺大的,而且有時候還不好找。
 *
 *                                         2016-9-27 深圳 南山平山村 曾劍鋒
 **************************************************************************/

一、錯誤現象:
    cat /var/mysql/mysql.err
        700101 00:01:09 mysqld_safe Starting mysqld daemon with databases from /var/mysql
        700101  0:01:09 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
        700101  0:01:09 [Note] Event Scheduler: Loaded 0 events
        700101  0:01:09 [Note] /usr/libexec/mysqld: ready for connections.
        Version: '5.1.73-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
        000101 00:06:42 mysqld_safe Starting mysqld daemon with databases from /var/mysql
        000101  0:06:42 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
        000101  0:06:42 [ERROR] Can't create IP socket: Permission denied
        000101  0:06:42 [ERROR] Aborting
        
        000101  0:06:42 [Note] /usr/libexec/mysqld: Shutdown complete
        
        000101 00:06:42 mysqld_safe mysqld from pid file /run/mysql/mysqld.pid ended

二、原因:
    應該是mysqld的執行使用者是mysql,然後無法使用root許可權的內容。

三、解決辦法:
    cat /etc/my.cnf
        ......
        # The MySQL server
        [mysqld]
        ......
        user=root
        ......

 

相關文章