OpenWrt安装mysql服务器
我正在尝试在OpenWrt上安装mysql服务器 mysql\u install\u db--force给我错误: /usr/bin/my_print_默认值:无法加载库'libnsl.so.0' 致命错误:找不到/usr/lib/mysqld 如果您是从源代码处编译的,则需要运行“makeinstall”进行复制 将软件安装到正确的位置,以备操作 如果您使用的是二进制版本,那么您必须处于顶层 或者传递指向的--basedir选项 那个位置 我已经安装了Libc,但在/usr/lib下找不到libnsl.so.0 我的.cnf在/etc下/ my.cnf的内容:OpenWrt安装mysql服务器,mysql,openwrt,Mysql,Openwrt,我正在尝试在OpenWrt上安装mysql服务器 mysql\u install\u db--force给我错误: /usr/bin/my_print_默认值:无法加载库'libnsl.so.0' 致命错误:找不到/usr/lib/mysqld 如果您是从源代码处编译的,则需要运行“makeinstall”进行复制 将软件安装到正确的位置,以备操作 如果您使用的是二进制版本,那么您必须处于顶层 或者传递指向的--basedir选项 那个位置 我已经安装了Libc,但在/usr/lib下找不到li
root@OpenWrt:/etc# cat my.cnf
[client]
port = 3306
socket = /var/run/mysqld.sock
[mysqld]
user = root
socket = /var/run/mysqld.sock
port = 3306
basedir = /usr
############ Don't put this on the NAND #############
# Figure out where you are going to put the databases
# And run mysql_install_db --force
datadir = /mnt/data/mysql/
######### This should also not go on the NAND #######
tmpdir = /mnt/data/tmp/
skip-external-locking
bind-address = 127.0.0.1
# Fine Tuning
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
# Here you can see queries with especially long duration
#log_slow_queries = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
# The following can be used as easy to replay backup logs or for replication.
#server-id = 1
#log_bin = /var/log/mysql/mysql-bin.log
#expire_logs_days = 10
#max_binlog_size = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
key_buffer = 16M
我还创建了mkdir/usr/lib/mysqld文件夹
drwxr-xr-x 2 root root 4096 Mar 19 17:39 mysqld
然后我得到一个错误:
/usr/bin/my_print_defaults: can't load library 'libnsl.so.0'
Installing MySQL system tables...
/usr/bin/mysql_install_db: line 418: /usr/lib/mysqld: Permission denied
Installation of system tables failed! Examine the logs in
/var for more information.
You can try to start the mysqld daemon with:
shell> /usr/lib/mysqld --skip-grant &
and use the command line tool /usr/bin/mysql
to connect to the mysql database and look at the grant tables:
shell> /usr/bin/mysql -u root mysql
mysql> show tables
Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /var that may be helpful.
Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS. Another information source are the
MySQL email archives available at http://lists.mysql.com/.
Please check all of the above before mailing us! And remember, if
you do mail us, you MUST use the /usr/bin/mysqlbug script!
'/usr/lib/libnsl.so.0' is not an ELF file
我还尝试:
cd/usr/lib
wget libnsl.so.0
然后我得到一个错误:
/usr/bin/my_print_defaults: can't load library 'libnsl.so.0'
Installing MySQL system tables...
/usr/bin/mysql_install_db: line 418: /usr/lib/mysqld: Permission denied
Installation of system tables failed! Examine the logs in
/var for more information.
You can try to start the mysqld daemon with:
shell> /usr/lib/mysqld --skip-grant &
and use the command line tool /usr/bin/mysql
to connect to the mysql database and look at the grant tables:
shell> /usr/bin/mysql -u root mysql
mysql> show tables
Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /var that may be helpful.
Please consult the MySQL manual section
'Problems running mysql_install_db', and the manual section that
describes problems on your OS. Another information source are the
MySQL email archives available at http://lists.mysql.com/.
Please check all of the above before mailing us! And remember, if
you do mail us, you MUST use the /usr/bin/mysqlbug script!
'/usr/lib/libnsl.so.0' is not an ELF file
我不知道该怎么办了。
请给我一些想法!谢谢
更新:
我已经更新了opkg.conf
删除mysql服务器
并从opkg.conf中提供的新url调用mysql服务器
mysql\u安装\u数据库现在工作得很好。
我可以毫无错误地启动mysqld,但是
我不能更改根密码
/usr/bin/mysqladmin -u root password 'xxxxxxxxx'
/usr/bin/mysqladmin: can't load library 'libnsl.so.0'
是否有其他更改mysql根密码的选项
更新2:
安装:
工作 你好!!你能详细说明你的解决办法吗?我也有同样的问题,但不明白你是怎么解决的。。请详细说明,以便我可以从头开始安装,并为此向您发送赏金:)我做这件事花了很长时间。你真幸运,我的路由器坏了,需要修理。我会在几天后告诉你结果。对不起,今天之前没有看到你的帖子。我记得。。。对不起,如果我不正确,请尝试以下操作:1。ssh到路由器2。工作组3。opkg install/path/file.ipk将使用什么?是否有非闪存存储?