Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

running "mysql_multi" on Cpanel

Discussion in 'Database Discussion' started by vpswing, Jun 4, 2014.

  1. vpswing

    vpswing Member

    Joined:
    Jun 4, 2014
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi,

    I've managed to run "mysql_multi" on my Cpanel VPS, with the original [mysqld] section moved to: [mysqld1]
    and a new 'instance' under the section [mysqld2]

    mysqld1 = port 3306
    mysqld2 = port 3307

    I've verified that both instances of mysqld is up and running on these 2 ports and can connect to them.
    The PROBLEM that I face is that I'm unable to set the location of the error log file :-(

    Any idea how I can do this?

    [mysqld1] <-- original mysqld settings.
    user=mysql
    datadir=/var/lib/mysql
    port=3306
    pid-file=/var/lib/mysql/mysqld.pid
    log_error=/var/lib/mysql/mysql1.log <-- even though I had specified this, the log file is still "$hostname.err"

    [mysqld2] <-- new mysqld instance
    user=mysql
    datadir=/var/lib/mysql2
    port=3307
    pid-file=/var/lib/mysql2/mysqld.pid
    log_error=/var/lib/mysql2/mysql2.log <-- can't get this error log to appear here or anywhere else.

    Any help/tips is very much appreciated!

    Thanks,
    Adrian
     
  2. vpswing

    vpswing Member

    Joined:
    Jun 4, 2014
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Found the solution. My fault actually, the datadirectory for [mysqld2] was owned by 'root' and not 'mysql' - that's why mysqld could not create the log file!

    Also, [mysqld1] should have a different port (not 3306) since that is the default port used by [mysqld].

    Cheers.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,307
    Likes Received:
    1,848
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    I am happy to see you were able to resolve the issue. Thank you for updating us with the outcome.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice