Planet MySQL Planet MySQL: Meta Deutsch Español Français Italiano 日本語 Русский Português 中文
Showing entries 1 to 10 of 19 9 Older Entries

Displaying posts with tag: database administration (reset)

How to Tell If It’s MySQL Swapping
+0 Vote Up -0Vote Down

On servers that are into the swap file and have multiple processes running, I often wonder if it’s MySQL that is in the swap or some other process.  With Linux this is a fairly easy thing to figure out.  Below is the format of a command to do just that:

echo 0 $(cat /proc/`pidof process`/smaps | grep TYPE | awk '{print $2}' | sed 's#^#+#') | bc

 

In the above command, TYPE refers to what type of Memory you want to examine.  Below are some of the options for this value:

TYPE Explanation
Private Private …
  [Read more...]
MySQL Installation Process Checklist
+0 Vote Up -0Vote Down

MySQL Installation Process Checklist

All DBAs, regardless of experience level, should follow a written process when setting up a new server.  There are just too many steps to neglect doing so and many of the steps you are likely to forget have little to do with MySQL.

Naturally, every company has a different process.  The process we outline below is one we have used in the past and focuses on working through the Change Management process, setting up backups and monitoring, and focusing on good communication with team members and clients as well as ensuring documentation of your work.  Hopefully this article will give you some …

  [Read more...]
Load Balancing a Galera Cluster
+0 Vote Up -0Vote Down

Introduction

This article details the proper method of load balancing either a Percona XTRADB Cluster (PXC) or MariaDB Cluster.  Both of these solutuions utilize the same Galera plugin to facilitate clustering.  This information deatails what ports must be open and how they are to be configured as well as how to route traffic to the database nodes.

There are generally a total of three (3) nodes in this cluster, along with a single load balancer. This is the minimum number of nodes required for a cluster. This does not mean that the cluster is down if one or two nodes are lost – it only means that at least three nodes are required for normal …

  [Read more...]
Performance Tuning a Data Loading Process
+0 Vote Up -0Vote Down

One common job for a DBA is working with a Development Team member on a batch loading process that is taking more time than expected.

Often once you start probing into what has already been done to performance tune the load process, it seems you often learn that very little has, in fact, been done to improve efficiency and speed.

Since there are so many things that can be done to improve this process, it really is outside the scope of this article to cover them all.  Hopefully this will serve as a guide to get you started in the process.

Let’s outline best practices for loading data into MySQL very quickly.  While …

  [Read more...]
Syncing a Broken Slave With Percona XTRABackup
+0 Vote Up -0Vote Down

Sometimes data sets are so large, a mysqldump to load a slave is just not practical.  With some of the systems we have administrated, we have had data so large it would have taken days to load the slave when it became out of sync with the master.  When this happens, we usually rely upon Percona’s XTRABackup utility which allows us to make a hot/online backup of the master to use for loading the slave.

In the old days we had to rely upon a third-party tool called ibbackup, or InnoDB Hot Backup utility to do this task. In many ways XTRABackup is a replacement for this tool and has in fact surpassed the ibbackup utility in features and …

  [Read more...]
Script to Convert Storage Engine on All Tables
+0 Vote Up -0Vote Down

Sometimes you encounter a server with multiple tables of a particular storage engine which you need to convert to another storage engine.  For us, this often happens when we find systems running MyISAM and we want to get these over to InnoDB.

There are a number of reasons to consider converting a table to another storage engine, such as performance, gaining additional features such as Foreign Keys, and so on.  You should, however, stop to consider that not all storage engines are created the same and do not offer the same features.

If there are hundreds of tables, the process can be very time consuming so we put together a simple …

  [Read more...]
Which App is Using a Port?
+0 Vote Up -0Vote Down

Have you ever tried to start a server like MySQL and been amazed to see an error that the port is already in use? You rack your brain and try to figure out what it would be to no avail. Sometimes you do a “ps” in Linux and don’t even see anything that you think would be using the port. Well, forutantely, there are some tricks to help you find out without doing a reboot. If it is a production server, a reboot may not be an option anyway!

Below are some methods to help. We will start by looking at the “fuser” utility provided with many Linux distros:

fuser -n tcp 80
80/tcp:               1029  1030  1824  1838  1839  1840  1841 13972 14136 14137 14712 …
  [Read more...]
Monitoring Disk Space
+0 Vote Up -0Vote Down

Some time back, when a client wanted us to setup MySQL Enterprise Monitor, we were surprised to find out that disk monitoring was not available! We worked hard to come up with a solution. Eventually, we decided to setup a custom agent to monitor the disk. Below is the result of that.

While this script may not work as-is for everyone, it should at least provide a basis for such a script. This script has been modified to send an email instead of plug directly into the MySQL Enterprise Monitor. But, it hopefully will get our creative juices flowing…

#!/bin/bash
#
# This script does a very simple test for checking disk space.
#
# Itchy Ninja Software: …
  [Read more...]
Our PHP Experiences
+0 Vote Up -0Vote Down

Many of the DBA’s at Itchy Ninja Software, began their careers as PHP Programmers, or before… We remember times sitting in a small office together writing PHP code before there were even books on the subject! We were scouring the web looking for examples and such and relying heavy on the documentation at the php.net site!

We wrote custom shopping carts before the days of oscommerce, zencart, and such. We wrote code to interface with payment gateways and process credit cards live. We also wrote code to pull products from MySQL databases, show staff members, and such. We worked for a newspaper group and were writing news “engines” to pull the articles, archive data, …

  [Read more...]
MySQL Forks: Conclusions
+0 Vote Up -0Vote Down

Part of an article originally published in the article MySQL Forks: Which one is right for me?, published in the June edition of php[architect]. The preceding portions of the article are available: A Brief History of MySQL Oracle MySQL Percona Server MariaDB Other Derivatives The MySQL ecosystem has never been stronger.  Oracle has responded to [...]

Showing entries 1 to 10 of 19 9 Older Entries

Planet MySQL © 1995, 2015, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.