XA transactions are an open standard for distributed transactions. A distributed or global transaction can spawn multiple databases. XA transactions come handy, for example, when data sets are sharded over multiple servers and a business transaction affects multiple shards. The free MySQL Fabric tools help to setup and manage a sharded MySQL cluster. The development version of PECL/mysqlnd_ms 1.6 helps with XA transactions. It abstracts SQL details and acts as a transaction manager. The PHP MySQL driver kicks in when things go wrong and XA transactions show their nasty side: blocked servers. Good news: this is a rare case. Bad news: a deep dive …[Read more]
How To Install Nginx With PHP And MySQL (LEMP Stack) On CentOS 7
Nginx (pronounced "engine x") is a free, open-source, high-performance HTTP server. Nginx is known for its stability, rich feature set, simple configuration, and low resource consumption. This tutorial shows how you can install Nginx on a CentOS 6.5 server with PHP support (through PHP-FPM) and MySQL (Mariadb) support.
This is the second part of my series on High Availability with mysqlnd_ms. In my first post, “Simple MySQL Master HA with mysqlnd_ms,” I showed a simple HA solution using asynchronous MySQL replication. This time we will see how to leverage an all-primary cluster where you can write to all nodes. In this post I used Percona XtraDB Cluster, but you should also be able to do the same with MySQL NDB Cluster or Tungsten Replicator.
To start with, here is the mysqlnd_ms configuration I used:
. All of these files are available from my Github repository. Below, I have three Percona XtraDB Cluster nodes, …[Read more]
Install Apache, PHP And MySQL On CentOS 7 (LAMP)
This tutorial shows how you can install an Apache2 webserver on a CentOS 7.0 server with PHP5 support (mod_php) and MySQL support. LAMP is short for Linux, Apache, MySQL, PHP.
I had the pleasure of presenting to the PHP Users Group Philippines a few days ago about mysqlnd_ms. The mysqlnd plugin, MySQL Master Slave, is a transparent layer on top of mysqlnd extension. This allows you to do read-write splitting and slave reads load balancing without needing to change anything from your application. But do you know you can also achieve a form of high availability with this plugin? I shared 2 forms on my presentation, using async MySQL replication either in master-slave configuration or master-master configuration, while the second form is having an all primary cluster where you can write to all nodes.
This first part is to demonstrate how you can achieve a simple HA solution using the first form. First, all the sample code here can be found on my GitHub repository. So, to use the mysqlnd_ms plugin, it uses …[Read more]
Understanding and installling the components of the LAMP stack are the first steps to learning the role of Linux, the Apache Server, MySQL and PHP in developing web applications. To learn more, take the MySQL and PHP - Developing Dynamic Web Application training course.
You can take this 4-day, instructor-led course as a:
- Live-Virtual Event: Take this class from your own desk, no travel required. Choose from events already on the schedule to suit different time-zones. These events are delivered in English.
- In-Class Event: Travel to an education center to take this class, for example at
Here are a few videos those of you who are just getting started with Sphinx may find useful. The first video demonstrates a very simple implementation with Ubuntu, PHP, and MySQL. The second video is also about installing on Ubuntu. And, the last video discusses fulltext query syntax. Check ‘em out. Quick Start with Ubuntu [...]
The development version of PECL/mysqlnd_ms now has an very early version of distributed (2PC/XA) transaction support tailored for use with clusters of MySQL servers. XA transactions can span multiple servers in a cluster to ensure transaction guarantees among them. In real life, there is always, at some point, a sequence of work on your data for which atomicity, consistency, isolation, and durability must be given. The early generation of NoSQL sharding solutions has a weak spot here. How do you, as a developer, ensure a logical operation affecting two shards is either applied to both or none? Either you don’t …[Read more]
Well, we have all heard about the fastest php framework out
there. But how do we install it in a Ubuntu Linux machine.
Default process for any linux setup.
1. First, we need a few packages previously installed. To install them, issue the distro specific command in your linux terminal.
sudo apt-get install php5-dev php5-mysql gcc libpcre3-dev
sudo yum install php-devel php-mysqlnd gcc libtool
sudo yum install php-devel php-mysql gcc libtool
yast2 -i php5-pear php5-devel php5-mysql gcc
Basically, here we are installing the dev tools we require to compile and setup the Phalcon extension.
2. Get the Phalcon build using git
How To Install Nginx With PHP5 (And PHP-FPM) And MySQL Support On CentOS 6.5
Nginx(pronounced "engine x") is a free, open-source, high-performance HTTP server. Nginx is known for its stability, rich feature set, simple configuration, and low resource consumption. This tutorial shows how you can install Nginx on a CentOS 6.5 server with PHP5 support (through PHP-FPM) and MySQL support.