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.

running "mysql_multi" on Cpanel

Discussion in 'Database Discussions' 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:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page