Mysql Mybooklive

@anon50098793

root@OpenWrt:~# mysql_install_db --force --basedir=/usr
root@OpenWrt:~#
root@OpenWrt:~# /etc/init.d/mysqld start
mysqld: cannot detect privileges table, you might need to
mysqld: run 'mysql_install_db --force' to initialize the system tables

Don't want to access the device to view and resolve?

ubus call system board
1 Like

@anon50098793

{
        "kernel": "4.14.131",
        "hostname": "OpenWrt",
        "model": "MyBook Live",
        "board_name": "wd,mybooklive",
        "release": {
                "distribution": "OpenWrt",
                "version": "18.06.4",
                "revision": "r7808-ef686b7292",
                "target": "apm821xx\/sata",
                "description": "OpenWrt 18.06.4 r7808-ef686b7292"
        }
}

i am accessing by ssh there i can give access to my pc so i can solve

opkg install strace
strace mysql_install_db --force --basedir=/usr 2>&1 | grep -E '(read|ENOENT)' | grep -v 10

@anon50098793

root@OpenWrt:~# opkg install strace
Installing strace (4.22-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/powerpc_464fp/base/strace_4.22-1_powerpc_464fp.ipk
Configuring strace.
root@OpenWrt:~# strace mysql_install_db --force --basedir=/usr 2>&1 | grep -E '(read|ENOENT)' | grep -v 10
root@OpenWrt:~#
root@OpenWrt:~# /etc/init.d/mysqld start
mysqld: cannot detect privileges table, you might need to
mysqld: run 'mysql_install_db --force' to initialize the system tables

hmmmm..... both the strace command and the install_db command should have produced output....

i'm thinking it could be target package related but without output from those commands.... not too sure whats going on there...

How do I enable command output? or what files / commands do you need?

@anon50098793

I followed this tutorial:

https://openwrt.org/docs/guide-user/services/webserver/lamp,
using:
1- uHTTPd

2- Installing and Configuring PHP

3- Installing and configuring a database server

try adding some swap... and rerun the install_db command....

which some swap
????

Hi all,

mysqld switches from root to user mariadb when it starts up. So all the folders that it uses (like tmpdir) need to have permissions adjusted for that. For instance the user mariadb needs to have write access to tmpdir etc.

Regarding RAM, yes, that can be an issue. On my 128 MB RAM device I can't run the server without adding a swap file. In another forum topic (here) it was reported that you can run it on a 512 MB RAM device without swap.

@micmac1
Thanks for the reply, and now solved now another problem:
I have php7-mod-mysqli installed but dame error:

bugal error: Error not captured: 'mysqli' class not found in /svr/www/demo/index.php:7 Stack trace: # 0 {main} thrown in /svr/www/demo/index.php on line 7

Glad you got it working. Regarding the php issue I don't know.

Certainly not, the swap is a USB/MMC/uSD/SSD killer !
You can use swap ONLY on real harddisk...

Swap on an SSD is fine.

Running anything on an embedded device that requires swap is not a wise idea. Too many more appropriate SBCs out there at reasonable prices to even do the math around 5-10 MB/s transfer rates and hundreds of MB of swap.

Hi, how did you solve the issue? I am accounting the same issue..

@Nemo

Yes I solved the problem, still need help?

Thanks. I already solved it too.

Running swap on SSD is a very bad idea !

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.