×
×

Debian 5.0 (Lenny) x64 MySQL/Galera and phpMyAdmin image notes

Back

Debian 5.0 (Lenny) x64 MySQL/Galera and phpMyAdmin image notes

Linux with MySQL Galera replication and phpMyAdmin installed. The Apache web server and PHP scripting language (mod_php Apache module) are installed as functional requirements.

Galera/MySQL product integrates Galera replication engine with MySQL/innodb server and provides multi-master synchronous cluster for innodb engine. phpMyAdmin is a free software tool written in PHP intended to handle the administration of MySQL over the World Wide Web. Apache Apache Hypertext Transfer Protocol Server.

PHP: Hypertext Preprocessor is a widely used, general-purpose scripting language that was originally designed for web development to produce dynamic web pages.
The service version (shown in native reported format ) is:

# /usr/libexec/mysqld -V
/usr/libexec/mysqld  Ver 5.1.43 for unknown-linux-gnu on x86_64 (wsrep_0.7.3)
# dpkg --list|grep phpmyadmin;
ii  phpmyadmin                              4:2.11.8.1-5+lenny3      MySQL web administration tool
# /usr/sbin/apache2 -v
Server version: Apache/2.2.9 (Debian)
Server built:   Nov 14 2009 21:07:23
# dpkg --list libapache2-mod-php5
ii  libapache2-mod-php5                5.2.6.dfsg.1-1+lenny6              server-side, HTML-embedded scripting language
(Apache 2 module)
phpMyAdmin version is 2.11.8.1

MySQL/Galera and Apache web server are configured to start at the VM boot time. To change the status, please use service: run a System V init script, and chkconfig: updates and queries runlevel information for system services.

Galera/MySQL

The Galera/MySQL cluster benifits:
  • High Availability transaction is committed in all cluster nodes: Back up functionality
  • Performance scalability even with write intensive loads: Load Balancing
  • Transparency direct client connections : work as with regular MySQL database
PLEASE REMEMBER TO SET A PASSWORD FOR THE GALERA/MySQL USER !
The current user and password are: wsrep_sst:wspass
The user and password are used to log in to phpMyAdmin web interface.

To do so, edit the following file /etc/mysql/conf.d/wsrep.cnf and change into new user:password on the string:

wsrep_sst_auth=wsrep_sst:wspass

Restart mysql:

# /etc/init.d/mysql restart

If upgrading from an older mysql version, run:

# mysql_upgrade

Grant privileges to SST user with the command:

# mysql -e "set wsrep_on=OFF; delete from mysql.user where user=''; grant all on *.* to user@'%' identified by 
 'password'; flush privileges; set wsrep_on=ON;"

Restart mysql once again (it needs correct privileges at startup, this
will be fixed soon):

# /etc/init.d/mysql restart
By default the Virtual Server is not configured to start new or join to existing Galera/MySQL cluster.

In case the node is starting a new cluster run:

# mysql -e "set global wsrep_cluster_address='gcomm://';"

If the note is connecting connecting to existing cluster:

# mysql -e "set global wsrep_cluster_address='gcomm://:4567';"
The node will be disconnected from cluster (in both cases it was started new or joined existing) after MySQL service or VPS restart

To keep node cluster membership set wsrep_cluster_address value on the /etc/mysql/conf.d/wsrep.cnf file

wsrep_cluster_address="gcomm://:4567"

Check the node status with:

#mysql -e "show status like 'wsrep%'"

In case the node is in a cluster it will report something like this:

| wsrep_cluster_status      | Primary                              |
...
| wsrep_ready               | ON                                   |

otherwise …

| wsrep_cluster_status      | Disconnected         |

phpMyAdmin

phpMyAdmin web interface is available at http://[IP]/phpmyadmin/index.php
The [IP] Virtual Server default IP address.

phpMyAdmin is connected via UNIX socket at Localhost.

Its main Apache configuration file is /etc/apache2/conf.d/phpmyadmin.conf