topleft topright

Tranquil Hosting Blog

Archive for the ‘mysql’ Category

Cpanel presentation on MySQL Clustering

Monday, December 3rd, 2007

The Cpanel team has published this presentation from their training similar that addresses how to use remote MySQL servers and the basics of MySQL clustering and replication:

http://trainingseminar.cpanel.net/slides/trackb/MySQL%20Remote%20Server.pdf

Cpanel’s support for remote MySQL servers is not very robust, but most web hosts should consider it if they are running highly dense shared hosting servers. The presentation outlines the modifications necessary to point Cpanel and its related applications to the remote MySQL server.

Hsphere mysql backup script

Monday, June 4th, 2007

Need to backup your mysql databases in a pinch? Here is a quick script for making backups of the mysql databases on a hsphere db server:


#!/bin/bash
#
#
TODAY=`date +%m-%d-%Y`
for i in $( ls -l /var/lib/mysql/ | grep drwx | awk '{print $9}' ); do
/hsphere/shared/bin/sudo -H -u mysql mysqldump -Q --opt -u root $i > $i.$TODAY.sql
done

It will put the database dumps in the directory where you run this script.

PHP MySQL error: Client does not support authentication protocol

Saturday, May 19th, 2007

This is a fairly common error to see on a web server setup with PHP and MySQL:

Client does not support authentication protocol requested by server

The most likely cause for this is that PHP is built with MySQL support, using its bundled MySQL client. The bundled MySQL client is old, version 3.23.x. MySQL introduced a new password mechanism in version 4.1 of the server. If the MySQL server is setup for the new style of passwords, clients older than 4.1 will not be able to authenticate properly.

To see if this is your problem, look at a phpinfo() on your server. Scroll down to the mysql section and check the “Client API version”. Chances are, the version displayed there is not the same as your MySQL server. For an RPM-based Linux distribution, you can fix this by installing the proper mysql-devel package and then re-compiling PHP passing “–with-mysql=/usr” to the configure script. This way, when php compiles it will use the header files for your version of MySQL.


php mysql client

Copyright © 2007, Tranquil Hosting, Inc.
Managed Dedicated Servers | Managed Virtual Private Servers | Raleigh Datacenter Colocation
Raleigh, North Carolina Premium Hosting Provider
Terms of Service