A Fair Desire

Sweet and fresh 
Filed under

linode

 

MySQL won't restart...and how easy it is to reset MySQL passwords

mysqld is dead

I just found out that the MySQL server on one of my servers hasn't been running for a month. That is kind of embarrassing. But I thought I would just start it back up and life would be good again.

Except it didn't want to start. Strange!

This is what the log looked like when I tried to start MySQL:

Jul 13 05:45:41 li91-222 mysqld[17063]: 100713  5:45:41 [Warning] option 'thread_stack': unsigned value 65536 adjusted to 131072
Jul 13 05:45:41 li91-222 mysqld[17063]: 100713  5:45:41  InnoDB: Started; log sequence number 0 43655
Jul 13 05:45:41 li91-222 mysqld[17063]: 100713  5:45:41 [ERROR] Can't start server: Bind on TCP/IP port: Cannot assign requested address
Jul 13 05:45:41 li91-222 mysqld[17063]: 100713  5:45:41 [ERROR] Do you already have another mysqld server running on port: 3306 ?
Jul 13 05:45:41 li91-222 mysqld[17063]: 100713  5:45:41 [ERROR] Aborting
Jul 13 05:45:41 li91-222 mysqld[17063]:
Jul 13 05:45:41 li91-222 mysqld[17063]: 100713  5:45:41  InnoDB: Starting shutdown...
Jul 13 05:45:42 li91-222 mysqld[17063]: 100713  5:45:42  InnoDB: Shutdown completed; log sequence number 0 43655
Jul 13 05:45:42 li91-222 mysqld[17063]: 100713  5:45:42 [Note] /usr/sbin/mysqld: Shutdown complete

So, something about not being able to bind to the port, got it. But I'm pretty sure nothing else is running on port 3306, especially not mysqld. So that error message is a bit misleading.

After some searching around, I found someone who reported they had this same problem when their loopback device wasn't started up properly. Sounded weird, but I checked (ifconfig) and...no loopback device. Next step, ifup lo. Didn't work. So I checked /etc/network/interfaces. It looked like this:

auto lo
iface lo inet loopback

pre-up iptables-restore < /iptables.conf

auto eth0
iface eth0 inet dhcp

So, what was the problem? iptables.conf didn't exist. Solution: create it, comment out the line, or remove the line. Then run ifup lo again.

This problem seems to stem from when I restarted my Linode server for the first time ever in order to take advantage of their big free increase in RAM. (It's now $19.95/month for 512MB.)

What's my password?

I hadn't had to touch the database in quite a while (obviously, since I did not even know it was down), so I completely forgot the password. Seems like quite a problem, doesn't it? Well, it turns out resetting any MySQL password is actually really easy. Almost too easy, to be honest.

The instructions are here.

Filed under  //   linode   linux   mysql  

Comments [0]

If you are changing web hosts...

Recently, I moved from Slicehost to Linode. For one particular site, Slicehost was my name server. When I had everything working on Linode, I cancelled my Slicehost account, thinking the DNS settings on Linode would take over and my domain name would be pointing to the right place.

Well, it didn't at first...but I know DNS changes can take time. So I waited...nothing. Checked the DNS settings on Linode. Everything looked right. So I waited some more...nothing. The whois information still showed Slicehost as the name server for the domain. I started worrying that I should have changed something on the Slicehost account before deleting my account.

Finally, it dawned on me to check my domain registrar (I use Site5) and see if there were any settings there. Sure enough, that's where you can set the name servers for the domain. Changed to point to Linode's name servers, and life was good again. My sincere apologies to any of the two people who might have tried to access that site during my fit of stupidity!

Filed under  //   hosting   linode   site5   slicehost  

Comments [3]

Slicehost Adds 32-bit Images, Linode is Still Cheaper

A little while ago, I put up a small post about why Linode is (slightly) better than Slicehost. One of my reasons was that Slicehost defaults to 64-bit versions of Linux, meaning running the same applications take up more memory (other people have provided more qualitative evidence of this). Well, now Slicehost is experimenting with 32-bit userspace, while keeping the kernel 64-bit. That will probably help memory usage, as long as you are using one of the distributions that supports this and don't mind that it's still experimental support on Slicehost's part. There are other ways to do this, too, but...it just seems easier to go with a host that is 32-bit to start with, unless you specifically need a 64-bit system.

Besides, Linode's plans still give you more for the same cost. So I will be sticking with them.

Filed under  //   linode   slicehost  

Comments [0]



A Fair Desire