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

Displaying posts with tag: System Administration (reset)

Installing MySQL on Mac OS X easily
+0 Vote Up -0Vote Down

Installing MySQL Database on Ubuntu or CentOS is a trivial operation as long as they have nice package managers as Aptitute and YUM. Otherwise, in Mac OS X is a hard operation from downloading the correct package, apllying with several steps and it can break the whole install, if you But, with Homebrew, the install... Read More

The post Installing MySQL on Mac OS X easily appeared first on Devops for Dummies.

The network is reliable
+2 Vote Up -0Vote Down

A fascinating post-mortem on high profile network failures:

This post is meant as a reference point–to illustrate that, according to a wide range of accounts, partitions occur in many real-world environments. Processes, servers, NICs, switches, local and wide area networks can all fail, and the resulting economic consequences are real. Network outages can suddenly arise in systems that are stable for months at a time, during routine upgrades, or as a result of emergency maintenance. The consequences of these outages range from increased latency and temporary unavailability to inconsistency, corruption, and data loss. Split-brain is not an academic concern: it happens to all kinds of systems–sometimes for days on end. Partitions deserve serious consideration.

Stuck at "copying to tmp table"
+0 Vote Up -0Vote Down

I have a fairly lightly loaded MySQL server with a few tables that are updated every five minutes. Other than these updates, there are very few queries run against the database. The data is queried just a few times per month. Ever so often, one of the more complicated queries will result in the process getting hung in the "copying to tmp table" state. To be honest, the queries that get hung aren't even that complicated. Usually there's one or two joins, a GROUP BY, and an ORDER BY.

So far, when a process gets stuck in this state, I find that killing and restarting the process does not clear up the problem. I've changed my recovery method to killing the process, issuing a FLUSH

  [Read more...]
Apache Can't Use Remote MySQL Server When SELinux is Enabled
+0 Vote Up -0Vote Down

I don't know why SELinux problems seem so frustrating. The problem almost certainly is related to the fact that there is frequently no error message. This is exactly the problem I ran into while turning up a new Apache web server on Red Hat Enterprise Linux 6 (RHEL6) with SELinux enabled.

The problem is that SELinux prevents Apache from making network connections by default. This is defined by the SELinux boolean httpd_can_network_connect_db. In order to change this value, issue the following

  [Read more...]
InnoDB disabled if ib_logfile files corrupted
+1 Vote Up -0Vote Down

I recently came across a dev VM running MySQL 5.0.77 (an old release, 28 January 2009) that didn’t have InnoDB available. skip-innodb wasn’t set, SHOW VARIABLES LIKE '%innodb%' looked as expected, but with one exception: the value of have-innodb was DISABLED.

I confirmed this with SHOW ENGINES:

(root@localhost) [(none)]> show engines;
| Engine     | Support  | Comment                                                        |
| MyISAM     | DEFAULT  | Default engine as of MySQL 3.23 with great performance

  [Read more...]
What's New in CFEngine 3: Making System Administration Even More Powerful
+1 Vote Up -0Vote Down

CFEngine is both the oldest and the newest of the popular tools for automating site administration. Mark Burgess invented it as a free software project in 1993, and years later, as deployments in the field outgrew its original design he gave it a complete rethink and developed the powerful concept of promise theory to make it modular and maintainable. In this guise as version 3, CFEngine stands along with two other pieces of free software, Puppet and Chef, as key parts of enterprise computing. Along the way, Burgess also started a commercial venture, CFEngine AS, that maintains both the open source and proprietary versions of CFEngine.

Diego Zamboni has recently taken the position of Senior Security Advisor at CFEngine AS and is writing

  [Read more...]
SNMP Traps into MySQL is Sublime
+0 Vote Up -0Vote Down

I use snmptrapd to catch SNMP traps and then put them into a MySQL database using a pretty generic trap handler. This gives me the opportunity to generate such useful information as:

> SELECT HOUR(time) AS "hour", COUNT(*) AS "bounces" FROM snmptraps
    WHERE hostname = 'XXX' AND time > '2011-07-25'
        AND trap_oid = 'SNMPv2-MIB::snmpTrapOID.0 IF-MIB::linkDown'
    GROUP BY HOUR(time)
| hour | bounces |
|    0 |     729 |
|    1 |     936 |
|    2 |     841 |
|    3 |     810 |
|    4 |     547 |
|    5 |     316 |
|    6 |     224 |
|    7 |     144 |
|    8 |     481 |
|    9 |     584 |
|   10 |       1 |
11 rows in set (0.05 sec)

This tells us that interfaces on host 'XXX' where bouncing a lot until 10 AM and then stopped.

Clear Windows DNS Server Cache From the CLI
+0 Vote Up -0Vote Down

Clearing the Windows DNS Server cache from the command line is an easy task.

C:\> dnscmd . /clearcache

The . indicates the local DNS server. You can use this command to clear the cache of remote DNS servers by replacing the . with the hostname or IP address of the remote server.

  [Read more...]
MySQL + SELinux: Can't change dir (Errcode: 13)
+0 Vote Up -0Vote Down

If you're using a non-standard MySQL data directory on your Red Hat Enterprise Linux (RHEL) server, you may have seen an error like /usr/libexec/mysqld: Can't change dir to '/mysql_data/' (Errcode: 13). The key to fixing this problem is to ensure the new MySQL data directory has the proper SELinux security context. In my case:

# chcon -R system_u:object_r:mysqld_db_t /mysql_data/

After that, mysqld should start up fine.

MySQL: Query caused different errors on master and slave
+0 Vote Up -0Vote Down

We ran across the following error on a MySQL slave server recent:

Last_Error: Query caused different errors on master and slave. Error on master: 'Deadlock found when trying to get lock; try restarting transaction' (1213), Error on slave: 'no error' (0). Default database: '<database_name>'. Query: '<query>'

In this case, an insert failed on the master. When this happens you have three options:

  • If possible, make the slave table match the master table and the restart the slave process.
  • If that isn't possible, check to see if the SQL can be run manually. If so, run it and then tell the slave to skip that command and continue. (More on how to do this below.)
  • If the command is unimportant, then just skip it.
  • In the

      [Read more...]
    Showing entries 1 to 10 of 23 10 Older Entries

    Planet MySQL © 1995, 2014, 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.