We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

FAQ: How do I install a MySQL Server on the Omega?


  • administrators

    First, enable the OpenWRT/LEDE packages repo by following our guide.

    Afterwards, install the package:

    opkg update
    opkg install mysql-server
    

    EDIT: removing broken link
    Then check out this guide on configuring and using MySQL server
    Then look for an OpenWRT-specific guide on configuring and using MySQL server



  • @Lazar-Demin
    the url mentioned for configuration and usage of mysql server seems invalid. Any updated instructions for usage of mysql-server?



  • @akhileshthorat Try opkg install mariadb-server Mariadb is mysql compatible developed by the original authors of MySQL after they sold it to Oracle. Also look at sqlite3, this is a light weight alternative to MySQL well suited to IoT devices


  • administrators

    @akhileshthorat Good call, I've updated the original post to remove the broken link. Let me know if you find a good alternative guide to configuring and using MySQL on OpenWRT.

    Or if you find other guides for the db alternatives mentioned by @crispyoz



  • @crispyoz I have installed sqlite3. It is lightweight and works perfect for IoT applications. The only drawback for sqlite3 is it doesn't have a network endpoint.
    I use node-red to build dashboards for dynamic ui tables linked with databases. I was successful in installing mysql node for node-red but failed to host a mysql server on same host.



  • @Lazar-Demin I looked up for generic Openwrt based guides for MySQL, tried few approaches but got stuck at a issue where db installer demands a buffer size of 20MB

    root@Omega-A160:~# mysqld
    2023-04-11 13:59:00 2012355852 [Note] mysqld (mysqld 10.1.45-MariaDB) starting as process 3299 ...
    2023-04-11 13:59:00 2012355852 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.
    
    2023-04-11 13:59:00 2012355852 [Note] InnoDB: Using mutexes to ref count buffer pool pages
    2023-04-11 13:59:00 2012355852 [Note] InnoDB: The InnoDB memory heap is disabled
    2023-04-11 13:59:00 2012355852 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    2023-04-11 13:59:00 2012355852 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
    2023-04-11 13:59:00 2012355852 [Note] InnoDB: Compressed tables use zlib 1.2.11
    2023-04-11 13:59:00 2012355852 [Note] InnoDB: Using Linux native AIO
    2023-04-11 13:59:00 2012355852 [Note] InnoDB: Using generic crc32 instructions
    2023-04-11 13:59:00 2012355852 [ERROR] mysqld: Can't create/write to file '/mnt/data/tmp/ibXXXXXX' (Errcode: 13 "Permission denied")
    2023-04-11 13:59:00 77f21d0c  InnoDB: Error: unable to create temporary file; errno: 13
    2023-04-11 13:59:00 2012355852 [ERROR] Plugin 'InnoDB' init function returned error.
    2023-04-11 13:59:00 2012355852 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    2023-04-11 13:59:00 2012355852 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
    2023-04-11 13:59:01 2012355852 [ERROR] Unknown/unsupported storage engine: InnoDB
    2023-04-11 13:59:01 2012355852 [ERROR] Aborting
    
    
    

    Also tried increasing buffer size in .cnf file to 20MB, nothing worked.

    Need to deep dive into internals to understand what's happening under the hood


  • administrators

    @akhileshthorat Is it possible to change the location of the buffer file?
    If so, put it in /tmp - this partition is actually run on (half of) the Omega's RAM, so it will be very fast to access and will have quite a bit of space, 64MB on the Omega2+/2S+



Looks like your connection to Community was lost, please wait while we try to reconnect.