Python access to external mysql server

Is it possible from Python3 on a RUTX11 (or other similar Teltonika unit) to access an external MySQL database server?
It is normally possible through the Python “mysql.connector” library, but this library is not on list of available python libraries for RUTX.
Are there any plans of porting this library to RUTX devices?
Are there any alternatives or workarounds to access a MySQL database?
I’m aware of the sqlite3 library, but I need access to a remote DB which a believe sqlite3 cannot do.


Our RUTOS is built on OpenWRT, and the packages are derived from OpenWRT packages. Unfortunately, the mysql.connector package is not implemented, so you won’t be able to use it. It’s unlikely to be implemented in OpenWRT or RUTOS in the near future. You can try searching for similar packages in OpenWRT.

To see all available packages, use:

opkg update
opkg list

Currently, the only similar supported package is python3-sqlite3. You can explore if your solution can be achieved using it.



Thanks for your reply and your time looking into this.

On the OpenWRT list, I found the “python3-pymysql” library.
It could sound feasible for my use requirement.

However is is not on the ‘opkg list’ of the RUTX11.
Is it possible to get this library into the RUTOS?

Kind regards Mikael


Certainly, you can obtain the required packages. To install the ‘python3-pymysql’ package, execute the following commands:

  1. Update the package list: opkg -e /etc/opkg/openwrt/distfeeds.conf update
  2. Install the package: opkg -e /etc/opkg/openwrt/distfeeds.conf install python3-pymysql

Please note that these packages are not directly supported by us, and there may be limitations in their functionality or intended operation.

Best regards,


This topic was automatically closed after 15 days. New replies are no longer allowed.