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