{"id":21800991,"url":"https://github.com/wpcodevo/rust-axum-mysql","last_synced_at":"2025-04-13T18:23:22.229Z","repository":{"id":214311767,"uuid":"629104359","full_name":"wpcodevo/rust-axum-mysql","owner":"wpcodevo","description":"In this article, you'll discover how to use the Axum framework to build a RESTful API in Rust that supports basic CRUD (Create, Read, Update, Delete) operations against a MySQL database.","archived":false,"fork":false,"pushed_at":"2023-12-27T09:40:08.000Z","size":28,"stargazers_count":30,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T09:11:34.551Z","etag":null,"topics":["axum","axum-framework","crud","crud-api","docker","mysql-database","rust","sqlx","sqlx-cli"],"latest_commit_sha":null,"homepage":"https://codevoweb.com/rust-crud-api-example-with-axum-framework-and-mysql/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wpcodevo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-04-17T16:17:26.000Z","updated_at":"2025-02-05T13:43:14.000Z","dependencies_parsed_at":"2023-12-27T10:45:28.391Z","dependency_job_id":null,"html_url":"https://github.com/wpcodevo/rust-axum-mysql","commit_stats":null,"previous_names":["wpcodevo/rust-axum-mysql"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpcodevo%2Frust-axum-mysql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpcodevo%2Frust-axum-mysql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpcodevo%2Frust-axum-mysql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpcodevo%2Frust-axum-mysql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wpcodevo","download_url":"https://codeload.github.com/wpcodevo/rust-axum-mysql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248759142,"owners_count":21157098,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["axum","axum-framework","crud","crud-api","docker","mysql-database","rust","sqlx","sqlx-cli"],"created_at":"2024-11-27T11:15:33.732Z","updated_at":"2025-04-13T18:23:22.196Z","avatar_url":"https://github.com/wpcodevo.png","language":"Rust","readme":"# Rust CRUD API Example with Axum Framework and MySQL\n\nIn this article, you'll discover how to use the Axum framework to build a RESTful API in Rust that supports basic CRUD (Create, Read, Update, Delete) operations against a MySQL database. To achieve this, we'll be leveraging the SQLx toolkit, which provides a simple and efficient way to interact with databases.\n\n![Rust CRUD API Example with Axum Framework and MySQL](https://codevoweb.com/wp-content/uploads/2023/04/Rust-CRUD-API-Example-with-Axum-Framework-and-MySQL.webp)\n\n## Topics Covered\n\n- Set up and Run the Axum MySQL CRUD API Project\n- Run the Axum CRUD API with a Frontend App\n- Set up the Rust Project\n- Set up the MySQL Server with Docker\n- Connect the Axum Server to the MySQL Server\n- Perform Database Migrations\n- Define the SQLX Database Model\n- Define the API Request Structs\n- Implement the CRUD Functionalities\n    - Route Function to Fetch All Records\n    - Route Function to Insert a Record\n    - Route Function to Retrieve a Record\n    - Route Function to Edit a Record\n    - Route Function to Delete a Record\n    - The Complete Code of the Route Functions\n- Create an Axum Router for the Route Functions\n- Register the Axum Router and Set up CORS\n- Conclusion\n\nRead the entire article here: [https://codevoweb.com/rust-crud-api-example-with-axum-framework-and-mysql/](https://codevoweb.com/rust-crud-api-example-with-axum-framework-and-mysql/)\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpcodevo%2Frust-axum-mysql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwpcodevo%2Frust-axum-mysql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpcodevo%2Frust-axum-mysql/lists"}