Termux重置MariaDB(MySQL)密码
按顺序执行命令即可:
1 | mysqld_safe --user=mysql --skip-grant-tables --skip-networking & |
1 | flush privileges; |
重启设备,如果打开mysql出错,提示ERROR 2002 (HY000): Can't connect to local server through socket '/data/data/com.termux/files/usr/var/run/mysqld.sock' (2)
,使用以下命令启动mysql:
1 | nohup mysqld & |