Category: Databases

Create .my.cnf File for MySQL Authentication

To simplify administration of MySQL I like to create a /root/.my.cnf file with the mysql root credentials. This way I can run the mysql command line utility without having to authenticate. Just edit /root/.my.cnf and add the following:

Read More »

How-to Secure A New MySQL Installation

After install MySQL, it’s important that you secure the installation by (a) removing anonymous accounts and (b) setting a password on the admin account. This can be done with mysqladmin or with direct SQL queries. I prefer the SQL queries

Read More »

Move MySQL tmpdir to RAM

1. Create the tmp directory:

2. Set permissions:

3. Determine mysql user id:

4. Edit /etc/fstab and add the following line:

5. Mount the new tmpfs partition:

6. Edit /etc/my.cnf and set location of tmp

Read More »

Setup Alternate MySQL Instance

To setup an alternate instance of MySQL listening on TCP port 3307 on a RHEL5 server follow these steps. 1. Setup a new MySQL config file.

Add a line like this:

to the “[mysqld]” section. Edit /etc/my-3307.cnf and

Read More »

MySQL Binary Log Rotation

Came across a handy configuration setting for mysql:

Controls how many days of binary log files should be retained. Very good way to keep the binary logs from over flowing available storage.

Read More »

Get a free consultation from Reliable Penguin

Submit the form—or for immediate service call 866-649-7984.