Manually change WordPress’ home and siteurl in MySQL

In my tidy process, I had to copy WordPress from one host to another, then access it from various URLs so that the production and the development versions were both accessible from the same public IP. To duplicate the data in a fast manner, I dumped the SQL data and tarred the WWW directory. The problem is that WordPress’ home and siteurl are kept the same between those instances. And since you try to access the administration zone, you’re redirected to the original location… To modify the duplicated instance, you can configure WordPress straight from MySQL.

Here are the directions:
Continue reading…

Configure SOGo to use MySQL socket

When connecting SOGo with MySQL, you may either use a remote or a local server.

To use a remote server, you’ll configure SOGo with such directives:

SOGoProfileURL = "mysql://sogouser:sogopass@mysqlhost:3306/sogodbname/sogo_user_profile";

To use a local MySQL server, you will need to access the mysql.socket file. And when it is secured with chroot&friends, the mysql.sock may not be where SOGo expects it. I have mine located at /var/chroot/mysql/mysql.sock. Normally, you would modify my.cnf to refer to the MySQL socket file. But, with SOGo, you must configure the directives as follow:

SOGoProfileURL = "mysql://sogouser:sogopass@%2Fvar%2Fchroot%2Fmysql%2Fmysql.sock/sogodbname/sogo_user_profile";

Just replace the host:port section with the path of the file, replacing every “/” with “%2F“.

That’s All Folks!

Source: http://www.mail-archive.com/users@sogo.nu/msg05730.html

Tune MySQL on NetBSD and OpenBSD

powered by MySQLFor quite a few days now, in my “optimize than damm WordPress” quest, I’m playing with Ubuntu, NetBSD and OpenBSD in (VMware Fusion) virtual machines and spare hardware I have. One of the idea is to optimize MySQL on those systems. The MySQL configuration file in named my.cnf and is not located in the same place on every systems…
Continue reading…

Manage MySQL on a Synology DS409slim

Here’s the way to install, run and manage MySQL on a Synology DS409slim.
My DiskStation runs DSM 3.1-1748.

First of all, activate the MySQL dæmon:

  • From the Control Panel, choose the Web Services ;
  • Enable Web Station and Enable MySQL ;

Continue reading…

Optimize PHP on NetBSD

On a NAMP (NetBSD, Apache, MySQL, PHP) server, you can get a faster PHP rendering using eAccelerator.

First of all, install the php53-eaccelerator package.
Then, configure PHP to use it and the system to allow memory allocation:

# vi /usr/pkg/etc/php.ini
(...)
extension=eaccelerator.so
[eaccelerator]
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.shm_only="256"
eaccelerator.debug="0"
(...)
# sysctl -w kern.ipc.shmmax=536870912
# vi /etc/sysctl.conf
kern.ipc.shmmax=536870912
# /etc/rc.d/apache restart

According to ApacheBench, the initial “Time per request” was 3 sec. Using eAccelerator, it goes down to 1.9 sec.

Source: Optimize PHP