Skip to content

Archive

MySQL

3 articles
Go Updated 02 Sep 2025 3 min read

Build a CRUD API with Go, Gin, MySQL, and GORM

This tutorial builds a small CRUD API with Go, the Gin web framework, MySQL, and GORM. It also uses godotenv for local development configuration. 1. Create the Project mkdir myapp cd myapp go mod init myapp 2. Install Dependencies go get github.com/gin-gonic/gin go get gorm.io/gorm go get gorm.io/driver/mysql go get github.com/joho/godotenv Run go mod tidy after adding your imports so the module file reflects the dependencies actually used by the application.

Database 29 Sep 2022 2 min read

Configuring Remote MySQL Access on Linux

MySQL installations are commonly configured to listen only on a local interface. If a database must accept connections from another machine, you need to adjust the server’s listening address, create an appropriately scoped account, and make sure the network firewall allows only the required clients. Step 1: Update the MySQL Configuration Edit the MySQL configuration file On Ubuntu and Debian installations, a common file is: sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf Change bind-address

Database Updated 07 Sep 2025 2 min read

How to Create Users and Databases in MySQL

Managing users and databases is a fundamental MySQL administration task. This guide shows how to create a user, create a database, and grant that user the permissions needed to work with the database. 1. Create a New MySQL User Start by creating a user with its own login credentials. Basic syntax: CREATE USER 'user' IDENTIFIED BY 'password'; 'user': the username to create. 'password': the password for that user. Example: