前提情况是这样
我在安卓手机上利用 Linux Deploy 安装了 Ubuntu 16,但是由于 Linux Deploy 的工作原理是在安卓手机本身的 Linux 环境下搞一个 chroot 然后在其中装一个 Ubuntu 16
我遇到的问题是
在安装 MySQL 或者 Apache2 的时候,会被提示“ Runing in chroot,Ignore request ”具体记不清了,总之是安装过程中有提示,可能导致安装不完全,最终无法启动。
请问在 chroot 下该如何安装 MySQL
1
iwtbauh 2018-04-09 18:36:53 +08:00 via Android
可以手动启动 mysqld_safe
|
3
seanan OP 补充一下目前的报错信息
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) 而我在 /var/run/mysqld/ 目录下面根本找不到 mysqld.sock |
4
iwtbauh 2018-04-10 12:05:49 +08:00 via Android
@seanan
安装就直接安装 启动时会报错 Runing in chroot,Ignore request 这时候就手动启动 MySQL,一样的 setsid mysqld_safe > /dev/null 2>&1 & 然后再运行 mysql -uroot ...是不是就可以连上了 |
5
seanan OP carlostq@localhost:~$ sudo setsid mysqld_safe > /dev/null 2>&1 &
[1] 21845 carlostq@localhost:~$ mysql -uroot ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) [1]+ Done sudo setsid mysqld_safe > /dev/null 2>&1 carlostq@localhost:~$ mysql -root ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) carlostq@localhost:~$ mysql -uroot ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) carlostq@localhost:~$ @iwtbauh |
6
iwtbauh 2018-04-11 08:51:52 +08:00 via Android
|
7
seanan OP Ubuntu 16.04 LTS [running via Linux Deploy]
Last login: Tue Apr 10 22:24:38 2018 from 192.168.31.144 carlostq@localhost:~$ su root Password: root@localhost:/home/carlostq# mysqld_safe 2018-04-11T05:05:48.174188Z mysqld_safe Logging to syslog. 2018-04-11T05:05:48.204541Z mysqld_safe Logging to '/var/log/mysql/error.log'. 2018-04-11T05:05:48.338428Z mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 2018-04-11T05:05:50.889678Z mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended root@localhost:/home/carlostq# ^C root@localhost:/home/carlostq# service mysql start * Starting MySQL database server mysqld No directory, logging in with HOME=/ |