The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

script /scripts/mysqlup is causing binlog and relaylog to be owned by root

Discussion in 'General Discussion' started by cornernote, Feb 14, 2009.

  1. cornernote

    cornernote Member

    Joined:
    Nov 9, 2003
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    I am finding that my MySQL binary and relay logs are CHOWNed by root instead of mysql. This caused replication to stop and gives me all kinds of headaches.

    My mysql folder structure is non-standard, as follows:
    /home/mysql/logs
    /home/mysql/data
    /home/mysql/tmp


    I have isolated the issue to the cPanel update script "mysqlup":

    - Daily script called by "cron":
    /scripts/upcp

    - Script called by "upcp":
    /scripts/mysqlup

    Here is some simple steps to replicate my issue.

    [/home/mysql/logs]# ls -l
    -rw-rw---- 1 mysql mysql 117 Feb 15 10:17 log-bin.000027
    -rw-rw---- 1 mysql mysql 117 Feb 15 10:17 log-bin.000028
    -rw-rw---- 1 mysql mysql 98 Feb 15 10:17 relay-log.000051
    -rw-rw---- 1 mysql mysql 98 Feb 15 10:17 relay-log.000052

    [/home/mysql/logs]# /scripts/mysqlup
    MySQL Setup Script Version 7.0
    Fetching http://httpupdate.cpanel.net/mysqlinstall/RELEASE/cPpkgversion (0)....@67.222.0.10......connected......receiving...100%......Done
    Loaded cPPkgs::MySQL ok!
    This is the cPPkgs::MySQL 5.0.67 installer for Linux.
    MySQL 5.0.67 is up to date
    Unable to create mysql privileges database at /scripts/mysqlup line 605.
    Install Complete

    [/home/mysql/logs]# ls -l
    -rw-rw---- 1 mysql mysql 117 Feb 15 10:17 log-bin.000027
    -rw-rw---- 1 mysql mysql 117 Feb 15 10:17 log-bin.000028
    -rw-rw---- 1 root root 117 Feb 15 10:22 log-bin.000029
    -rw-rw---- 1 root root 117 Feb 15 10:22 log-bin.000030
    -rw-rw---- 1 mysql mysql 98 Feb 15 10:17 relay-log.000051
    -rw-rw---- 1 mysql mysql 98 Feb 15 10:17 relay-log.000052
    -rw-rw---- 1 root root 98 Feb 15 10:22 relay-log.000053
    -rw-rw---- 1 root root 98 Feb 15 10:22 relay-log.000054


    Brett
     
  2. cornernote

    cornernote Member

    Joined:
    Nov 9, 2003
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    6
    I will try to keep this post in sync with the ticket I submitted...


    Hi,

    I am able to replicate your issue. I'm escalating this to level 3 for review
    and resolution; thanks! In the meantime, you can put something like the
    following in /scripts/postupcp (I've already added it for your convenience, and
    am testing it now):

    #!/bin/bash
    # temporary fix for non-standard mysql directory.

    for dir in data import tmp logs ; do

    if [ -d "/home/mysql/${dir}" ]; then
    chown -R mysql.mysql "/home/mysql/${dir}" &>/dev/null
    fi

    # end temp fix


    Thanks; I'll get this issue escalated for review in the meantime.

    --
    Jamyn Shanley, Analyst
    cPanel of Texas, Inc.
     
  3. cornernote

    cornernote Member

    Joined:
    Nov 9, 2003
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    I have opened a internal report about this issue to our developers. I have also opened a public report for you to track here:

    http://bugzilla.cpanel.net/show_bug.cgi?id=8753

    Thank you.
    --
    Kyle Pinkley
    cPanel Technical Analyst III
     
Loading...

Share This Page