Skip to content

MySQL is an open-source relational database management system widely used for web applications, data warehousing, and enterprise applications.

DatabaseTableMySQLAPI

Tenzir connects to MySQL over the network using the MySQL wire protocol. Tenzir communicates with MySQL via the host and port you specify in the from_mysql operator. This means:

  • Network: Tenzir and MySQL can run on the same machine (using localhost) or on different machines in the same network. You just need to make sure that Tenzir can reach the MySQL server.
  • IPC: There is no direct inter-process communication (IPC) mechanism; all communication uses MySQL’s network protocol.
  • Co-deployment: For best performance and security, deploy Tenzir and MySQL in the same trusted network or use TLS for encrypted connections.

These examples assume that the MySQL server is running on the same host as Tenzir.

from_mysql show="tables", host="localhost", database="mydb"
from_mysql sql=r"SELECT id, name, email FROM users WHERE active = 1",
host="localhost", database="mydb"
from_mysql table="events", live=true, host="localhost", database="mydb"

Last updated: