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

Displaying posts with tag: Professional (reset)

Percona Live Conference Recommendations
+2 Vote Up -0Vote Down

While many attendees are repeat offenders, if 2013 is your first MySQL conference and you are relatively new with MySQL (say

Here are my top recommendations that give you a good grounding in the various conference topics and a wealth of experience from known MySQL authorities, on important topics.

  • A backup today saves you tomorrow by Ben Mildred at Pythian. Losing your data is a terrible experience. Learn what is needed to keep your data safe and you system highly available.
  •   [Read more...]
    When is the error log filename not the right filename
    +3 Vote Up -0Vote Down

    When evaluating a MySQL system one of the first things to look at is the MySQL error log. This is defined by the log[_-]error variable in the MySQL Configuration file. Generally found like:

    grep log.error /etc/my.cnf

    It is possible to find multiple rows because this could be defined in the [mysqld] and [mysqld_safe] sections. It is also possible it is incorrectly defined twice in any given section.

    Immediately I see a problem here, and the following describes why. If you look at this file name, in this case it’s actually found, but the file is empty.

    $ ls -l /var/lib/mysql/logs/mysql_error_log
    -rw-r----- 1 mysql mysql 0 Feb 19 20:35 /var/lib/mysql/logs/mysql_error_log

    An error log should never exist and be

      [Read more...]
    The MySQL symlink trap
    +3 Vote Up -1Vote Down

    Many users of MySQL install and use the standard directories for MySQL data and binary logs. Generally this is /var/lib/mysql.
    As your system grows and you need more disk space on the general OS partition that commonly holds /tmp, /usr and often /home, you create a dedicated partition, for example /mysql. The MySQL data, binary logs etc are then moved to this partition (hopefully in dedicated directories). For example data is placed in /mysql/data.
    Often however, a symbolic link (symlink) is used to so MySQL still refers to the data in /var/lib/mysql.

    When it comes to removing the symlink and correctly configuring MySQL, you first stop MySQL and correctly defining the datadir my.cnf variable to point to the right location. However, MySQL still keeps the legacy directory information around and this will cause MySQL replication to fail in several ways when you

      [Read more...]
    What OS do you use for MySQL?
    +0 Vote Up -0Vote Down

    In looking at operating systems in use for last year I found a very high concentration of RedHat/CentOS 5, and Ubuntu LTS operating systems. I would like to get a better picture of what is really used for MySQL production systems.
    Please take a moment to help me out. This survey only has one question.


    Poor programming practices
    +3 Vote Up -2Vote Down

    When will it stop. These amateur programmers that simply cut/paste code really affect those good programmers in the ecosystem trying to make a decent living. I was reviewing a developed (but incomplete) PHP/MySQL system using a common framework (which in itself is irrelevant for this post).

    In one source file there were 12 repetitions of the following code:

        if (!array_key_exists($id,$this->session->userdata['permissions']) OR
    	!array_key_exists('id', $this->session->userdata['permissions'][$id]) OR
    	!array_key_exists('scope', $this->session->userdata['permissions'][$id]['name'])){
          $this->session->set_flashdata('alert', 'You are not authorized to go there.');

    It’s bad enough when code

      [Read more...]
    Upgrading to MySQL 5.5 on Ubuntu 10.04 LTS
    +4 Vote Up -0Vote Down

    Ubuntu does not provide an apt-get repository package for MySQL 5.5 on this older OS, however this is still a widely used long term support version. The following steps will upgrade an existing MySQL 5.1 apt-get version to a standard MySQL 5.5 binary.

    Step 1. Remove existing MySQL 5.1 retaining data and configuration

    sudo su -
    service mysql stop
    cp -r /etc/mysql /etc/mysql.51
    cp -r /var/lib/mysql /var/lib/mysql.51
    which mysqld
    dpkg -P mysql-server mysql-server-5.1 mysql-server-core-5.1
    which mysqld
    which mysql
    dpkg -P mysql-client-5.1 mysql-client-core-5.1
    which mysql
    dpkg -P libdbd-mysql-perl libmysqlclient16 mysql-common
    # This will not remove /etc/mysql if any other files are in the directory
    dpkg -l | grep mysql
    [ -d /etc/mysql ] && mv /etc/mysql /etc/mysql.uninstall
    cp -r /etc/mysql.51 /etc/mysql

    2. Prepare configuration  [Read more...]

    Not a cool new feature for Master_Host
    +1 Vote Up -1Vote Down

    I was surprised to find on a customer MySQL server this new syntax for Master_host in SHOW SLAVE STATUS.

    *************************** 1. row ***************************
                   Slave_IO_State: Connecting to master
                      Master_Host: or 10.XXX.XX.XXX
                      Master_User: repl
                      Master_Port: 3306
                    Connect_Retry: 60
                  Master_Log_File: db1-354215-bin-log.000005
              Read_Master_Log_Pos: 1624
                   Relay_Log_File: db2-354214-relay-log.000001

    Is this a fancy new Percona Server feature? No. It’s operator error.

    We read a little further to find.

                 Slave_IO_Running: Connecting
                    Last_IO_Errno: 2005
      [Read more...]
    Installing MySQL MHA with Percona Server
    +0 Vote Up -0Vote Down

    MySQL MHA by Oracle ACE Director Yoshinori Matsunobu is an excellent open source tool to help in providing HA with native MySQL replication. The installation however is dependent on some Perl packages and to the untrained eye this may be an issue if you are using Percona Server as your choice of MySQL implementation.

    The MHA Node page requires the perl-DBD-MySQL package to be installed. The installation on RedHat/CentOS/Oracle Linux look like this:

    $ sudo yum install perl-DBD-MySQL
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * base:
    * extras:
    * updates:
    Setting up Install Process
      [Read more...]
    SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
    +1 Vote Up -0Vote Down

    This would have to be one of the most common MySQL error messages that is misleading to the end user developer. The MySQL Manual page confirms the broad range of possible conditions, but offers little to a PHP developer that does not speak MySQL Geek. I am commonly asked to help solve this issue from a developer.

    The problem is that there are several conditions that can cause this error, and a more meaningful explanation to the end user would help in addressing the issue. In general terms, this actually means “Your SQL statement has failed because the connection to the database has been disconnected because of ???”.

    Here are a few common situations and how to check for what “???” is.

    1. Your MySQL server really did go away.

      [Read more...]
    Open Source Database Schemas
    +0 Vote Up -0Vote Down

    I am seeking the help of the community. I am working on an evaluation project about schema design in open source applications. While it’s possible for me to download the software of many popular apps, and install the software and then do a mysqldump, it takes time. Quite often there is no simple schema.sql file, but a process for creating the schema. If you are using an open source project, would you take a moment and run the following.

    $ mysqldump -u[user] -p --skip-lock-tables --no-data --databases [schema]  > [schema].sql

    This will only dump the table definitions, and should therefore contain nothing company specific. I have at this time:

    • WordPress
    • Drupal
    • Mediawiki
    • OS Commerce
    • Joomla
    • EzPublish
    • PHPWiki

    I am open to any projects, and it doesn’t matter if the

      [Read more...]
    10 Newer Entries Showing entries 31 to 40 of 440 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.