android安装linux deploy搭建LNPM mysql设置及设置开机启动
安装debian很顺利,NP也没有麻烦,但是mysql始终无法启动,查看日志:
Dumping buffer pool(s) not yet started
The InnoDB memory heap is disabled
各种尝试,解决方法:
#: vi /etc/mysql/mariadb.conf.d/50-server.cnf
user = root #只需将此处改为root
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
另:cat /etc/group
找到inet行,把mysql的用户加到最后就可以了
..........................................................
设置NPM开机启动方式为sysv,在linux deploy 属性:linux-->初始化-->初始化系统-->选sysv
使用nestat命令查看3306端口状态:
~# netstat -an | grep 3306
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
从结果可以看出3306端口只是在IP 127.0.0.1上监听,所以拒绝了其他IP的访问。
解决方法:修改/etc/mysql/my.cnf文件。打开文件,找到下面内容:
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
把上面这一行注释掉或者把127.0.0.1换成合适的IP,建议注释掉。
重新启动后,重新使用netstat检测:
~# netstat -an | grep 3306tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN