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

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql [ERROR] Can't create IP socket: Permission denied相关的知识,希望对你有一定的参考价值。

/***************************************************************************
 *       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] Cant 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
        ......

 

以上是关于mysql [ERROR] Can't create IP socket: Permission denied的主要内容,如果未能解决你的问题,请参考以下文章

ERROR 2003 (HY000): Can't connect to MySQL server on 'ip'(111)

[ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn'

error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' '

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

ERROR 2003 (HY000): Can't connect to MySQL server

Mysql报错Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't