Top Nav

Archive | Databases

Install Percona Server 5.5 On CentOS 6.5

Today we’re going to install Percona Server 5.5 on a CentOS 6.5 server. Our server is hosted on Amazon AWS but the procedure should be the same for any host.

Percona Server is a drop-in replacement for MySQL that features enhanced performance. You can learn more about Percona here:

We’re going to do our install using the Percona Yum repository. The documentation is here:

Lets get started by adding the repository. Run this command as root:

and you’ll get output similar to this:

Now if you run this command:

You’ll see a list of available packages like:

Since our goal is to install Percona 5.5, we’ll do the following:

The install proceeds like this:

As you can see a number of supporting packages were also installed.

Next let’s configure Percona to start on boot:

And run it for the first time:

which should give some output like:

Notice that the service name for Percona is “mysql” instead of “mysqld” which is used by MySQL.

At this point the Percona Server 5.5 install has been completed.




Revoke MySQL DROP Privilege On Plesk Database User

Had a request from client to add database user on a Plesk server but to remove the DROP DATABASE privilege so that they could not accidentally delete their database. By default, database users created through Plesk do have the DROP DATABASE privilege. Plesk does not currently allow fine-grained control over database privileges so the only way to implement this change is to modify the privileges directly from a MySQL command line. After some testing we found these command will have the desired effect:

Of course replace “testdb” and “testdbuser” with your actual database and username.


Percona XtraDB Upgrade With Yum Shell

Ran into dependency problems today trying to upgrade a Percona XtraDB server cluster. Yum shell to the rescue:

This way I can run the remove and installs as part of a single transaction.



Here’s a one-liner that will check all tables in a database:

And here’s an article that shows the use of mysqlcheck:

mysqlcheck, unlike myisamchk, can be run when the mysql daemon is running

This command will check, repair and optimize all tables in all databases:



MySQL Error: Column count of mysql.proc is wrong. Expected 20, found 16. The table is probably corrupted;

Encountered this error when dropping a table on a database that had recently been migrated from 5.0 to 5.5:

The migration used a “mysqldump –all-databases” so it included the “mysql” database. Apparently the “mysql.proc” table changed between the versions. The fix on the new server is to run:

I didn’t figure this out … instead Daniel Tillett gets the credit.