#mysql

[Solved] Error while Installing mysql2 Gem in M1 Mac

Published by Prabin Poudel 3 min read
cover: [Solved] Error while Installing mysql2 Gem in M1 Mac
In Ruby on Rails applications with mysql2 gem, mysql2 gem always threw error when trying in the new M1 Mac. The error always said "ld: library not found for -lzstd" and "make failed".

Interact with Mysql Server using mysql2 gem [Part 4] - Perform Transactions

Published by Prabin Poudel 13 min read
cover: Interact with Mysql Server using mysql2 gem [Part 4] - Perform Transactions
In this part, we will learn about how we can perform transactions in the external mysql database using mysql2 gem. Transactions helps us in making multiple queries to database ensuring all queries are performed or none at all.

Interact with Mysql Server using mysql2 gem [Part 3] - Prepared Statement

Published by Prabin Poudel 7 min read
cover: Interact with Mysql Server using mysql2 gem [Part 3] - Prepared Statement
In this part, we will learn about how we can perform prepared statements to the external mysql database using mysql2 gem. Prepared statements are very useful against SQL injections.

Interact with MySQL Server using mysql2 gem [Part 2] - Insert and Update Operations

Published by Prabin Poudel 5 min read
cover: Interact with MySQL Server using mysql2 gem [Part 2] - Insert and Update Operations
In this part, we will learn about how we can insert and update records to the external mysql server using mysql2 gem. We will add two new methods to our service that can insert and update records to mysql server using mysql2 gem.

Interact with MySQL Server using mysql2 gem [Part 1] - Performing select operations

Published by Prabin Poudel 5 min read
cover: Interact with MySQL Server using mysql2 gem [Part 1] - Performing select operations
Database interaction is very simple in rails with Active Record but what if you have to communicate with external mysql server? Gotcha! Let's create a service to perform queries we want without using Active Record.