Archive for September 2017

Mysql number of tables in DB

SELECT COUNT(*) FROM information_schema.TABLES WHERE table_schema = ‘databasename’;

Mysql create utf-8 database

Former practice: CREATE DATABASE mydatabase CHARACTER SET utf8 COLLATE utf8_general_ci; Current practice: CREATE DATABASE mydb CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

Postfix localhost IP address only bind configuration

Open /etc/postfix/main.cf file: bash# vi /etc/postfix/main.cf Append / modify line as follows to bind to localhost (127.0.0.1) only: inet_interfaces = 127.0.0.1 Type the following to restart Postfix: bash# /etc/init.d/postfix restart