Category: Linux
-
“error establishing a database connection” in a previously working WordPress site
My site just crashed!!! I received the oh-so-helpful error “establishing a database connection” when I went to my site. Other sites on the server were fine. The site was working fine, and my config had not changed. The httpd error log showed nothing. Then I found this in the MySQL logs (/var/log/mysqld.log) [ERROR] /usr/libexec/mysqld: Table…
-
CentOS, NTPD, VMware and sleeping.
I have a MacPro at home, and I am running VMware Fusion on it. At night, I sleep the machine to save electricity. I have a CentOS guest running and the time is always out of sync. After the VM is restored from sleep, the NTP service is no longer running and my time really…
-
CentOS Kickstart with local CDROM media and a “http config file”
At our NYC office, I have a PXE/Kickstart system setup. All I need to do is boot to PXE, and I can install CentOS with very little intervention. I have to choose Server vs Desktop (each choice points to a different http hosted kickstart cfg file.) and I have to setup my partitons how I…
-
Comparing master and slave MySQL WordPress DBs
My VPS host – Rackspace contacted me the other day to tell me that my host server became unresponsive. After it came back online I went to my MySQL replicated slave to check the status. The /var/log/mysqld.log said: Error reading packet from server: Client requested master to start replication from impossible position This article siad…
-
WordPress 3.2 requirements and CentOS 5.6
Current requirements PHP version 4.3 or greater MySQL version 4.1.2 or greater WordPress 3.2 requirements: PHP version 5.2.4 or greater MySQL version 5.0 or greater. Default PHP on Cent0S 5.6 = PHP 5.1.6. CRAP Updated: See this post on how to install an updated PHP on CentOS 5.6
-
Script to compare RPMs on two different CentOS servers
I wanted to make sure that the same RPMs were installed on several servers. I wasn’t worried about versions of RPMs because everything should be kept up to date via yum. So I sat down and wrote the script below. It has been on my ToDo list for quite a while! This script connects to…
-
AutoSSH on CentOS
I have been interested in MySQL replication over ssh and I wanted a way to make sure that the tunnel is always up. Everyone says to use AutoSSH. AutoSSH is not in EPEL, but is in rpmforge (Is that that same as DAG? Didn’t they merge?). I installed rpmforge: I don’t like to do the…
-
Mirror all MySQL DBs to the local machine
Continuing on my quest to get MySQL replicating over ssh, I am using the following bash function to replicate all remote DBs locally: Line 2 connects to the local AutoSSH tunnel and gets a list of all the remote DBs. Then we loop through the DBs and if there is not a DB locally…
-
MySQL replication of WordPress dbs over ssh
I wanted to setup MySQL replication over ssh for a small WordPress database. I have a VM that lives in my house, I wanted to be able to bring it up, make it current, disconnect, and then hack away. Here is my proceedure. On the master: Setup the replication user (I had to use 127.0.0.1…
-
My “Copy WordPress site to local” script
I wanted to write a script that would copy a WordPress site to the local machine from a remote server (securely over ssh). This would allow me to set up a test environment or backup. First I need to make sure the site exists on the source server. Then I want to get the current…
