MySQL Replication – Permission Denied Errors

I spent a long time beating my head against the wall trying to solve this, so I thought I’d share it here in the hopes that it helps someone else.

I picked up a very cheap VPS to serve as a backup for various services, and decided to use it as a MySQL slave for backup purposes, and to provide secondary DNS (with a MySQL backend). Despite having no problem maintaining a kind-of-complicated cluster of MySQL boxes at work, I could not for the life of me get basic replication running. It consistently failed:

100829 15:56:56 [ERROR] Slave I/O thread: error connecting to master 'replication@127.0.0.1:7777': Error: 'Access denied for user 'replication'@'localhost' (using password: YES)'  errno: 1045  retry-time: 60  retries: 86400

(Yes, 127.0.0.1 is the master. Port 7777 is an ssh tunnel.) I tore my hair out, and repeatedly dropped and re-created the replication user. I could connect by hand. I tripled-checked credentials. It just didn’t work. Some people advised that master.info was sometimes saved with incorrect information; I blew that file away and re-issued the CHANGE MASTER command. Still nothing.

Finally, someone mentioned an oddity they discovered: with long passwords, replication just refused to connect. I’d used my favorite method of assigning passwords: “head /dev/urandom | shasum” So I changed my password to ‘password’ (just for testing!), flushed privileges on the master, changed the password with CHANGE MASTER, and started the slave again. Viola.

This wouldn’t be nearly as annoying if I could find it documented anywhere. I would argue that it’s a bug. But there it is — shorten your password. (12 characters is the limit I’ve seen put forth.)

Live Scanner Feeds

Radio Reference is a popular website for (police) scanner enthusiasts. It offers a pretty revolutionary concept: enthusiasts hook their scanners up to computers which relay the traffic to RadioReference’s servers, which host them as Shoutcast feeds. (I would also argue that the site is the best resource out there for scanner frequencies, and there are also forums that comprise what I can only assume is the world’s largest scanner-related community.)

For some inexplicable reason, I ignored the Live Feeds for a long time, until I got an iPhone and discovered an abundance of “police scanner” apps that were built on top of those feeds. The feeds are quite popular — the site’s owner posted a blog entry showing his latest AWS bill, which shows about 14TB of incoming traffic and more than 35TB outgoing traffic.

Besides being really valuable for those who simply don’t own a scanner, some of the feeds provide audio that is out of reach for most people. I could easily listen to the LAPD, for example, despite living thousands of miles away. There’s now a feed for Mass State Police in the area; I own a scanner capable of receiving them, but their signal is very weak where I live, so it’s advantageous to listen over the Internet, despite a bit of lag. Waltham has a feed of its own (well, plus Newton Fire). Someone else provides a Merrimack Police feed, which is advantageous because it’s a digital voice (P25) signal and a capable scanner will run you $500.

Boston Police are conspicuously absent, even though a lot of smaller cities have feeds. It seems that there’s considerable interest in setting one up, but to date, no one has. (I’d love to myself, but I have very poor reception here — part of the reason I want a BPD feed in the first place!)

In any event, I’d recommend checking the feeds out. You can listen in with a browser, or use one of many smartphone apps.

Special Interests

If anyone has ever doubted that special interests were out of control, here’s proof: the National Association of Broadcasters and the RIAA have proposed legislation that would require all cell phones to contain FM radios.

I’m not really sure why I would want an FM radio on my iPhone, when I have over a thousand of my favorite songs on it, or when I can just pull up Pandora and stream music tailored specifically to my tastes. This isn’t to say that having an FM radio on a cell phone wouldn’t be cool, just that making it the law seems rather absurd.

Gary Shapiro, the CEO of the Consumer Electronics Association, blasted the idea as “the height of absurdity” and said something everyone has thought about the RIAA for years: “Rather than adapt to the digital marketplace, NAB and RIAA act like buggy-whip industries that refuse to innovate and seek to impose penalties on those that do.” FM radio and the RIAA are yesterday’s news, and they don’t even seem to be aware of it.

My favorite part of the article, though, is the paraphrased argument from a NAB executive: “Most Web-based music services don’t include emergency alerts that radio stations broadcast, he said. Requiring FM receivers in mobile phones would help better inform the public about emergencies or bad weather nearby, he said.”

Without realizing it, he proves once and for all just how out of touch they are. I have the Internet in my pocket, and can be reached instantly 24/7. In the middle of a sandwich shop, I can pull a device out of my shirt pocket and check the weather radar. While waiting in line for the train, I check the news. They look around and see people connected like never before, and what they conclude is apparently, “Those poor people have no way of knowing about major emergencies. What they need is FM radio.”

New Main Page Theme

It seems I do this often, but the main page was getting ugly to look at it. I replaced it with another theme. It’s obviously still got some styling issues and some places where I haven’t changed the default text that came with the template I bought… But I’ll get to that in time. 🙂 Image display isn’t working yet. I’m thinking of switching back to showing the full text of posts instead of truncating to a few hundred bytes. Any opinions?

Anonymous.

The Oregon Tea Party put out a bumper sticker that begins, “We are Anonymous.”

Anonymous was apparently displeased, as the Tea Party Oregon Facebook page may indicate:

I’m not linking to the page, because I had to crop my screenshot to leave out the Goatse guy. If you have retinal bleach, you can search Facebook yourself.