Connecting to a database in Python
Import the database class.
from alphadb import AlphaDB
Initialize an instance and connect it to a database using MySQL credentials.
db = AlphaDB()
db.connect(
host="localhost",
user="user",
password="password",
database="database",
)
Replace the credentials with your own. AlphaDB requires the user to have the following privileges: CREATE
, INSERT
, DELETE
, SELECT
, UPDATE
, ALTER
, DROP
and REFERENCES
.