---
title: "Discussion on \"Go language + MySQL REST API: CRUD example.\" | Hashnode"
description: "Discussion on \"Go language + MySQL REST API: CRUD example.\". In this article, we will learn how to create a RESTful API using Go language and MySQL database. We will implement CRUD (Create, Read, Update, Delete) operations for a simple \"users\" table in the MySQL database.\n\nPrerequisites:\n\nGo language installed..."
url: "https://hashnode.com/posts/go-language-mysql-rest-api-crud-example/6438160b8363bb9a3b25421c"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Go language + MySQL REST API: CRUD example.](https://blog.techwasti.com/go-language-mysql-rest-api-crud-example?utm_source=hashnode&utm_medium=feed)

In this article, we will learn how to create a RESTful API using Go language and MySQL database. We will implement CRUD (Create, Read, Update, Delete) operations for a simple "users" table in the MySQL database. Prerequisites: Go language installed...

Apr 13, 2023 · 5 min read · blog.techwasti.com  
Updated Apr 6, 2024  
Read the article

-   [#go](https://hashnode.com/tag/go)
-   [#rest-api](https://hashnode.com/tag/rest-api)
-   [#microservices](https://hashnode.com/tag/microservices)
-   [#programming-tips](https://hashnode.com/tag/programming-tips)
-   [#programming-languages](https://hashnode.com/tag/programming-languages)

## Written by

[Maheshwar Ligade](https://hashnode.com/@maheshwarligade)

@maheshwarligade · India

  
[View profile](https://hashnode.com/@maheshwarligade)

nothing is more dangerous than an Idea

Learner, Love to make things simple, Full Stack Developer, StackOverflower, Passionate about using machine learning, deep learning and AI

## Responses 2

Markdown supported · ⌘↵ to post

[Matt D](https://hashnode.com/@drummy)

[Apr 6, 2024](https://hashnode.com/posts/go-language-mysql-rest-api-crud-example/6438160b8363bb9a3b25421c/comment/661104ac57fd5b16eda5f421)

The Scan also errors when database values are null. Instead the struct should have sql.NullString instead of string type.

[Maheshwar Ligade](https://hashnode.com/@maheshwarligade)

[Apr 6, 2024](https://hashnode.com/posts/go-language-mysql-rest-api-crud-example/6438160b8363bb9a3b25421c/comment/661104ac57fd5b16eda5f421#reply-661132fbaa89503bc9974886)

Thank you, changes done

[Matt D](https://hashnode.com/@drummy)

[Apr 6, 2024](https://hashnode.com/posts/go-language-mysql-rest-api-crud-example/6438160b8363bb9a3b25421c/comment/6610fbec2fc845cf5e04d167)

I had to add missing import "encoding/json"
