MySQL Archives

MySQL is a complex topic – I know enough to get by in the world of WordPress. It’s one of those topics that you never knew you needed until you started diving deeper into storing data.

I like to pronounce it “My Ess Queue Elle”, not “My Sequel”…
and here are some other pointers I’ve picked up along my journey.

How to install MySQL on Mac OS X El Capitan

MySQL 2015

There are several ways to install MySQL on your Mac, for example:

  • compile from source
  • use the Homebrew package manager (http://brew.sh)
  • use a nifty script courtesy of Mac Mini Vault (http://git.io/eUx7rg)
  • or use the dedicated MySQL installer package (recommended)

I recommend the dedicated installer because it’s the only package that will also add a convenient Preference Pane for starting and stopping the service.

In this article I’ll focus on the latter, and I’ll also talk you through how to add MySQL to the PATH variable and how to secure MySQL to keep the evildoers away from your server.

These instructions will work on Yosemite and El Capitan (I’ve tested it on both systems – in fact that’s part of why I’m writing this, so that I can remember for next time).

 

Screen Shot 2015-11-02 at 10.40.12

Read more

How to find and replace in MySQL with phpMyAdmin

Sometimes you need to replace a string in your database with another string, and it can be rather tedious to plough through a large table manually. Thankfully MySQL can execute raw queries such as find and replace. This comes in handy if you’ve moved a WordPress installation to another URL: you only need to tweak … Read more

How to find and replace in MySQL

Sometimes you need to change some text in a MySQL table. For example, imagine you want to correct a spelling mistake or a reference in all your WordPress posts without having to change them one by one. Here’s how to do it with a raw SQL command. This works only on a single table – … Read more

How to log into MySQL as root user in Plesk

You may have noticed that there is no MySQL root user on servers running Plesk. That’s because Plesk renames this user into “admin” by default – for security reasons. The password for the admin MySQL account is the same as for the Plesk Panel admin account. Even so, when you try to login to MySQL … Read more

MySQL Replication Troubleshooting

crab-iconSometimes things don’t work out with replication. When I first started experimenting with it I thought this was a “setup and forget about it” kind of job.

Experience has shown though that you have to regularly triple check and see if things may have broken (despite a good and once working setup).

Let’s take a look at what you can do when your Slave isn’t replicating anymore. If you want to know more about how to setup replication, have a look at my previous article in which I explain how this works.

Read more