|
安装了 如下包
- opkg install libpthread libncurses libreadline mysql-server
复制代码
该错误是执行数据库初始化发生的
- root@OpenWrt:~# mysql_install_db --force
- FATAL ERROR: Could not find ./bin/my_print_defaults
- If you compiled from source, you need to either run 'make install' to
- copy the software into the correct location ready for operation.
- If you don't want to do a full install, you can use the --srcdir
- option to only install the mysql database and privilege tables
- If you compiled from source, you need to either run 'make install' to
- copy the software into the correct location ready for operation.
- If you don't want to do a full install, you can use the --srcdir
- option to only install the mysql database and privilege tables
- If you are using a binary release, you must either be at the top
- level of the extracted archive, or pass the --basedir option
- pointing to that location.
- The latest information about mysql_install_db is available at
- https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
- root@OpenWrt:~# sed -i 's,^datadir.*,datadir = "/srv/mysql",g' /etc/my.c
- nf
- sed: /etc/my.cnf: No such file or directory
- root@OpenWrt:~# sed -i 's,^tmpdir.*,tmpdir = "/tmp",g' /etc/my.cnf
- sed: /etc/my.cnf: No such file or directory
- root@OpenWrt:~# /etc/init.d/mysqld start
- root@OpenWrt:~# /etc/init.d/mysqld enable
- root@OpenWrt:~# mysqladmin -u root password '123456'
- -ash: mysqladmin: not found
- root@OpenWrt:~# /etc/init.d/mysqld start
- root@OpenWrt:~# /usr/bin/mysqladmin -u root password 123456
- -ash: /usr/bin/mysqladmin: not found
复制代码 |
|