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?
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
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.