MySQL ERROR 1366 (HY000): Incorrect integer value: ” for column ‘id’ at row 1 Problem & Fix

 

Problem:

MySQL throw the following error message on insert or update statement executed

 

Why?

Try to update string value into integer column, and strict sql mode is enabled.

Mainly occurred on MySQL 5.x or above.

 

How to Fix:

1. Disable strict sql mode

Update /etc/my.cnf , and remove STRICT_TRANS_TABLES from sql-mode

 

References:

https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_strict_trans_tables

Too many process sidekiq 4.2.7 gitlab-rails [0 of 25 busy]

I am running a small GitLab server for my personal use, but GitLab default concurrency settings up to 25.

So I try to update the max concurrency to free server resource.

 

Update Configuration

Add or update the value

 

Restart the Service

 

 

Most Simple and Fastest Way to Backup and Restore a MySQL Database (mysqldump & mysql client)

How to mysqldump and mysql to backup and restore a database:

Backup to .sql file

 

Restore from .sql file

 

Suggested to run the command in database server to get the fastest speed.

 

References:

https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html

How to Install ffmpeg on RHEL/CentOS 7

Install ffmpeg via ATRPMS repo

 

Try convert WAV file to MP3 format

 

References:

http://atrpms.net/documentation/install/

How to Install NGINX and PHP-FPM on RHEL/CentOS 7

Basic Server Setup

 

 

 

Setup NGINX and PHP-FPM

 

 

Update Configuration

 

 

 

 

Create Virtual Hosts

 

 

 

 

Setup Firewall (Optional)

 

SELinux Settings (Optional for SELinux enabled)

 

Reboot after Setup

 

 

Mounting a Cloud Storage Buckets as a File System on CentOS 7 Compute Engine Instances

Problem:

I need to mount a Google Cloud Storage Buckets to file system, and grant access to the web server.

 

Solution:

Use the Google Cloud Storage FUSE (gcsfuse) tool to mount a Cloud Storage bucket to your Compute Engine instance.

 

Steps:

Assumption:

  • I have a bucket named yctin-bucket
  • I want to mount this bucket to /cloud/yctin-bucket/
  • I was generated the Google Service Key, and stored into /src/gcloud_service_account.json

 

Mounting a bucket

 

To unmount the bucket

 

References:

 

Install & Setup Google Cloud SDK (gcloud command) on RHEL / CentOS 7

Problem:

bash: gcloud: command not found

 

Solution:

Install & Setup Google Cloud SDK

 

Steps:

1. Installing SDK

Reference: https://cloud.google.com/sdk/downloads

 

2. Initializing Cloud SDK

Reference: https://cloud.google.com/sdk/docs/initializing

 

3. Authorizing Cloud SDK Tools

Reference: https://cloud.google.com/sdk/docs/authorizing

 

 

 

 

How to Install MySQL 5.7 on RHEL/CentOS 7

Basic Server Setup

 

 

 

Setup MySQL 5.7

 

 

Setup Firewall (Optional)

 

Reboot after Setup

 

Optional Settings for MySQL 5.7

Disable MySQL Strict Mode

Reference: https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html

 

Fix MySQL Password Expired

To establish a global policy such that passwords never expire.

Update /etc/my.cnf

Reference: https://dev.mysql.com/doc/refman/5.7/en/password-expiration-policy.html