在 arm 手机 chroot 中编译的 mysql 无法启动

2017-04-06 11:34:19 +08:00
 lilifenghao44

环境:用 linux Deploy 软件建立了个 chroot debian. 使用 apt-get 安装 mysql 出现 dpkg 报错 手动编译 mysql,完成,启动报错

"""root@localhost:/home/fanli# /etc/init.d/mysql.server start

Starting MySQL [FAIL....] The server quit without updating PID file (/usr/local/mysql/data/localhost.pid). ... failed!"""

查看 err 文件

"""2017-04-06 10:30:27 26813 [Note] Plugin 'FEDERATED' is disabled.
2017-04-06 10:30:27 26813 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-04-06 10:30:27 26813 [Note] InnoDB: The InnoDB memory heap is disabled
2017-04-06 10:30:27 26813 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-04-06 10:30:27 26813 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrie 2017-04-06 10:30:27 26813 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-04-06 10:30:27 26813 [Note] InnoDB: Not using CPU crc32 instructions
2017-04-06 10:30:27 26813 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2017-04-06 10:30:27 26813 [Note] InnoDB: Completed initialization of buffer pool
2017-04-06 10:30:27 26813 [Note] InnoDB: Highest supported file format is Barracuda.
2017-04-06 10:30:28 26813 [Note] InnoDB: 128 rollback segment(s) are active.
2017-04-06 10:30:28 26813 [Note] InnoDB: Waiting for purge to start
2017-04-06 10:30:28 26813 [Note] InnoDB: 5.6.35 started; log sequence number 1625997
2017-04-06 10:30:28 26813 [Note] Server hostname (bind-address): '*'; port: 3306
2017-04-06 10:30:28 26813 [Note] IPv6 is not available.
2017-04-06 10:30:28 26813 [Note] - '0.0.0.0' resolves to '0.0.0.0';
2017-04-06 10:30:28 26813 [ERROR] Failed to create a socket for IPv4 '0.0.0.0': errno: 13.
2017-04-06 10:30:28 26813 [ERROR] Can't create IP socket: Permission denied
2017-04-06 10:30:28 26813 [ERROR] Aborting

2017-04-06 10:30:28 26813 [Note] Binlog end
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'partition'
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'INNODB_METRICS'
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'INNODB_CMPMEM'
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'INNODB_CMP'
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'INNODB_LOCKS'
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'INNODB_TRX'
2017-04-06 10:30:28 26813 [Note] Shutting down plugin 'InnoDB'
2017-04-06 10:30:28 26813 [Note] InnoDB: FTS optimize thread exiting.
2017-04-06 10:30:28 26813 [Note] InnoDB: Starting shutdown...
2017-04-06 10:30:29 26813 [Note] InnoDB: Shutdown completed; log sequence number 1626007
2017-04-06 10:30:29 26813 [Note] Shutting down plugin 'BLACKHOLE'
2017-04-06 10:30:29 26813 [Note] Shutting down plugin 'ARCHIVE'
2017-04-06 10:30:29 26813 [Note] Shutting down plugin 'MRG_MYISAM'

2017-04-06 10:30:29 26813 [Note] Shutting down plugin 'MyISAM'
./data/localhost.err
"""

                                                                                     排版不好见谅.
                                                                                     求解.
4963 次点击
所在节点    MySQL
9 条回复
jtnwm
2017-04-06 11:53:30 +08:00
好像没权限,关掉 SELinux 试试。
lilifenghao44
2017-04-06 12:22:13 +08:00
@jtnwm 你好,selinux 状态为 permissive 许可状态.
manhere
2017-04-06 12:38:17 +08:00
换个端口试试
extreme
2017-04-06 12:44:01 +08:00
Android 的 Kernel 对用户的网络权限有额外的限制。
需要把 MySQL 的用户加入用户组 android_inet 。
kmahyyg
2017-04-06 13:21:07 +08:00
su
setenforce 0
lilifenghao44
2017-04-06 13:40:37 +08:00
@manhere apache 都起来了.
@extreme 是这个问题,加入了 aid_inet 组,成功起来了程序和监听. 非常感谢.
@kmahyyg selinux 是许可的.
zhangguanzhang
2017-04-08 17:45:39 +08:00
@extreme 感谢层主解决
seanan
2018-04-08 19:29:02 +08:00
@lilifenghao44
你好,我也在 Linux DePloy 上装了 Ubuntu
我也遇到了类似的问题,请问你是怎么解决的呢?
“加入了 aid_inet 组”是什么意思呢?能详细说一下怎么操作吗?
另外,我 apache2 也运行不起来。
lanluosi
2019-03-09 17:16:32 +08:00
@seanan
usermod -a -G aid_net_raw mysql
加到 aid_net_raw 组就够了

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/352889

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX