Install MySQL-Python (MySQLdb) on macOS

MySQLdb is an thread-compatible interface to the popular MySQL database server that provides the Python database API.

Standard Installation

 

EnvironmentError: mysql_config not found

You need install mysql and link, before install MySQL-Python

 

CentOS 7 unable to login, display login incorrect immediately after input login name

Problem

Unable to login linux console, always show login incorrect for any login name

 

Why

Selected some security profile(e.g. PCI-DSS) during installation, but network connection is unavailable.

Installer unable to download some packages from the internet, and caused installation failure. You may feel the installation time longer than no security profile.

 

In my case is CentOS installer missing the web proxy settings 🙁

 

How to Fix

Select other security profile or setup correct network connection, and re-install the system.

 

Reference

CentOS-7 Installer Security Profiles

2.1. Requirements

These profiles require a connection to the internet to install. If you select a security profile that can not connect to the internet on port 80 (to mirror.centos.org), your install may fail spectacularly and not even allow access to the console locally. Please only try these profiles while connected to the internet.

Packages will be installed from the internet if you use security profiles, even if those packages also reside on the ISOs.

https://wiki.centos.org/TipsAndTricks/C7SecurityProfiles

 

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