02-12-2022
A simple demonstration of how to use Rust + SQLx + MySQL, complete with struct
& impl
as the OOP example.
- Open phpMyAdmin or MySQL Workbench,
- Create a new database
"journaling"
, - Import the SQL file
main.sql
, - Check if your
DATABASE_URL
inside the.env
matches your actual MySQL settings
Build:
cargo build --release
Run:
.\target\release\journaling