MySQL

Setting up MySQL Replication for High Availability

MySQL Replication is a feature of the MySQL server that allows you to replicate data from one MySQL database server (called the master) to one or more MySQL database servers (slaves). MySQL Replication has been supported in MySQL for a very long time and is an extremely flexible and powerful technology. Depending on the configuration, you …

Setting up MySQL Replication for High Availability Lees meer »

Hoe een MySQL database hernoemen

Er zijn 3 methoden om een mysql database te hernoemen. 1. Tabel hernoemen Voor InnoDB kun je de volgende manier gebruiken om de database te hernoemen: Maak een nieuwe lege database, en hernoem elke tabel naar dezelfde naam maar dan in de nieuwe lege database:

mysql-logo

Standaard MySQL commando’s

  Gebruikers Gebruikers bekijken. use mysql; select * from user; Gebruiker toegevoegen aan mysql. In het onderstaande voorbeeld krijgt de gebruiker “user” alle rechten over alle databases CREATE USER ‘user’@’%’ IDENTIFIED BY ‘some_pass’; GRANT ALL PRIVILEGES ON *.* TO ‘user’@’%’ WITH GRANT OPTION; flush privileges; Verwijder de history van MYSQL: rm -f /root/.mysqlhistory

CAP theorema

Databases zijn nooit helemaal perfect En brengen altijd problemen met zich mee. Dit heet ook wel het CAP theorema. Het CAP theorema, ook bekend als Brewers theorema, stelt dat het onmogelijk is voor een gedistribueerd computersysteem om gelijktijdig aan de volgende drie voorwaarden te voldoen: Consistency Alle nodes in het systeem zien dezelfde data op …

CAP theorema Lees meer »

Script to Automatically change current MySQL server in wp-config.php to another MySQL host to minimize WordPress and Joomla downtimes

I’m running a two servers for a couple of home hosted websites. One of the servers is serving as Apache host1 and has configured MySQL running on it and the second is used just for database host2 – (has another MySQL configured on it). The MySQL servers are not configured to run as a MySQL MASTER and MySQL SLAVE (no mysql …

Script to Automatically change current MySQL server in wp-config.php to another MySQL host to minimize WordPress and Joomla downtimes Lees meer »