Category: MySQL

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 »

MySQL Import Problem – Autoincrement

Trying to dump and import a mysql database from an old MySQL 3.x server to a 4.x server. Here’s an exerpt from the dump file:

What’s happening, is when it inserts the first row, it’s auto-incrementing the key value to 1, so the next row that tries to import gets a “Duplicate entry ‘1’ for key 1” error. The solution was to add the following line to the top of your sql dump file:

Later versions of mysql do this automatically. Problem is the first insert tries to put a 0 into the autoincrement field. Normal behavior is for the 0 to be converted to the next available increment which is one. Then the second row fails because there is already a 1 in the table. The mode setting above tells mysql to allow the 0 in the auto increment field.

Read More »

Easy MySql Install on RHEL AS4

The RHEL AS4 server had an active RHN membership so installing MySQL server was a quick and easy. Here are the commands: # up2date –install mysql-server # /sbin/service mysqld start # mysqladmin -u root password “my_root_password” # mysqladmin -u root -h localhost -p password “my_root_password” The last command will prompt for a password. Enter the value for “my_root_password”. And that’s all there was to it!

Read More »

MySQL 4.1.13 Binary Install To RHEL 3 Taroon

Recent I had to install MySQL on a RHEL 3 server. Normally I’d do this with RPMs but in this case the client needed an install that exactly matched another server which had been installed using the TAR/GZ binary distribution. Here are the steps used for the install: 1. Download the binary TAR/GZ distribution. In this case it was named mysql-standard-4.1.13-pc-linux-gnu-i686.tar.gz and I downloaded it to /root/archive. 2. Unpack the distribution.

3. The steps provided in the INSTALL-BINARY text file included in the distribution outline the following steps:

Taking these one at a time:

Skip this step. The mysql group already exists so there is no need to add it.

Skip this step. The mysql user already exists so there is no need to add it.

Complete this steps as provided.

Complete these steps as provided.

We’ll skip this step for now since

Read More »

Increase Max Process Memory Allocation

Use this command to increase the max memory that a single process can use:

Add to /etc/sysctl.conf to reload on each boot.

Read More »

Categories

Get a free consultation from Reliable Penguin

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