Skip to content

Instantly share code, notes, and snippets.

Working from home

Otienoh Otienoh

Working from home
View GitHub Profile
View VSCode Settings
"php.validate.executablePath": "C:\\Code\\bin\\php\\php-7.4.2-Win32-vc15-x64\\php.exe",
"git.enabled": true,
"git.path": "C:\\Code\\bin\\git\\bin\\git.exe",
"glassit.alpha": 220,
"workbench.editor.showTabs": true,
"editor.minimap.enabled": true,
"editor.codeLens": true,
"files.autoSave": "onFocusChange",
"editor.formatOnPaste": true,

How To Set Up Database Replication In MySQL

About MySQL replication

This tutorial describes how to set up database replication in MySQL. MySQL replication allows you to have an exact copy of a database from a master server on another server (slave), and all updates to the database on the master server are immediately replicated to the database on the slave server so that both databases are in sync. This is not a backup policy because an accidentally issued DELETE command will also be carried out on the slave; but replication can help in othe situations

  1. protect against hardware failures as part of your database failover strategy.
  2. Reducing load on production master server by running expensive report queries on the slave server. In these setup, you should only allow accept write queries on the master server, other wise those changes made on a specific slave server won't be replicated across all instances of replication servers.

MySQL Server setup

Consider a very simple example of mysql replicatio

Otienoh / PhpStorm Keyboard
Created Apr 23, 2017 — forked from koomai/PhpStorm Keyboard
Frequently Used PhpStorm Keyboard Shortcuts
View PhpStorm Keyboard

Note: Some of these shortcuts have been remapped for my own convenience (Preferences->Keymap). These are Mac shortcuts, just use the Windows/Linux equivalent of the Cmd/Option/Ctrl/Del keys.

####Search, Go to, Navigation ####

Cmd + P - Search file

Cmd + Shift + O - Search everywhere

(I swapped the above two recently because I use Cmd + P to search for files most of the time).

Otienoh /
Last active Oct 5, 2019
LAMP Server setup for Ubuntu 16.04 on Digital Ocean

Server setup for Ubuntu 16.04 on Digital Ocean

The setup installs the following software:

The setup installs the following software:

  • Apache
  • MySQL
  • PHP
  • Node
Otienoh /
Created Nov 23, 2015 — forked from hofmannsven/
My simply MySQL Command Line Cheatsheet