Business Analytics

Computing

MariaDB Server is one of the most popular database servers in the world. It’s made by the original developers of MySQL and guaranteed to stay open source.

For now, the MariaDB server is available only on-campus. To access it, you'll need a DB account username and password. The server may be reached by most DB clients, in a GUI (we recommend the open-source DBeaver client) or programmatically via Python or other. Upon connecting, you will have access to a single database whose name is your username.

Accessing via a GUI

To connect, in your GUI client enter

Accessing via Python

In Python, in your Jupyter notebook, install the Python libraries sqlalchemy and pymysql, and use the following code to initiate a connection.

import sqlalchemy
from sqlalchemy import create_engine, text

uri = "mysql+pymysql://USERNAME:PASSWORD@HOSTNAME:3306/USERNAME"
engine = sqlalchemy.create_engine(uri)

To read the contents of the table Menu into a pandas dataframe df,

query = text("SELECT * FROM Menu")
connection = engine.connect()
df = pd.read_sql(query, connection)