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.

remote mysql problem (important)

Discussion in 'General Discussion' started by katmai, Sep 19, 2007.

  1. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    526
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Brno, Czech Republic
    i have a big problem on my end.

    i have 2 servers as i want to use as web front end, 1 site, 1 db. and 1 db server.

    i setup the first server to use remote mysql. now. when i setup the second server to use remote mysql, doesn't work. i mean the server is still set as localhost. any ideas?
     
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    So, you have a total of three servers? 2 for the web, 1 for the db? Did you use the Remote MySQL setup "wizard" in WHM to setup both?
     
  3. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    526
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Brno, Czech Republic
    yes. but on the second server it doesn't set it up.

    mysql root user from the second server has all privileges on the db server,
     
  4. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    526
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Brno, Czech Republic
    Current MySQL Server
    localhost


    ... and i just run the setup mysql server script now. is there any log i could check on what's going wrong?
     
  5. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Always check /usr/local/cpanel/logs/error_log

    Which versions of cPanel are you using?
     
  6. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    526
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Brno, Czech Republic
    latest current. error_log does not show anything yet.
     
  7. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    526
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Brno, Czech Republic
    okay i got it now. seems that i forgot to configure the firewall to allow outgoing to that ssh ip :) check check the firewall otherwise you end up banging your head over the wall :)
     
  8. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    526
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Brno, Czech Republic
    Wed Sep 19 15:50:21 2007 warn [mysqlfe::listdbs]: Encountered error in mysqlfe::listdbs: Error from mysql wrapper: at /usr/local/cpanel/Cpanel/Logger.pm line 35
    Cpanel::Logger::cplog('Encountered error in mysqlfe::listdbs: Error from mysql wrapper:...', 'warn', 'mysqlfe::listdbs', 1) called at /usr/local/cpanel/Cpanel/EventHandler.pm line 43
    Cpanel::EventHandler::event(2, 'post', 'mysqlfe', 'listdbs', 'HASH(0x90edd54)', 'ARRAY(0x9700844)') called at cpanel.pl line 4600
    main::api2_exec('MysqlFE', 'listdbs', 'HASH(0x970a078)', 'HASH(0x90f1b1c)') called at cpanel.pl line 1238
    main::cpexectag('<?cp MysqlFE::listdbs(^J[tr class="row-%"]^J^I[td align="center"]%[...') called at cpanel.pl line 4392
    main::dotag(undef) called at cpanel.pl line 4281
    main::cpanel_parseblock('SCALAR(0x90a9b40)') called at cpanel.pl line 4235
    main::cpanel_parse('GLOB(0x92f13e4)') called at cpanel.pl line 1077


    second server - error log.

    when i create databases on the second server they are not being set on the remote server...

    do i have to flush privileges or restart the mysql server or some sort?
     
    #8 katmai, Sep 19, 2007
    Last edited: Sep 19, 2007
  9. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    526
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Brno, Czech Republic
    this is crazy. i just added an user to the second server, to see maybe it's privileges issue, and the remote mysql server is gone now, when i check whm. it's again localhost, and the dbs are on localhost.

    help?

    Using Remote mySQL Server
    Copying MySQL Script.....0%.. ..100%.. ...Done
    Running MySQL Script...

    Using 1.1.1.1 as the access ip
    Sync Source: http://httpupdate.cpanel.net/CURRENT/scripts
    Fetching http://httpupdate.cpanel.net/cpanelsync/CURRENT/scripts/.cpanelsync.lock (0)....@209.85.80.214......connected......receiving......Done
    Fetching http://httpupdate.cpanel.net/cpanelsync/CURRENT/scripts/.cpanelsync.bz2 (0)....@209.85.80.214......connected......receiving...24%...48%...73%...97%...100%......Done
    ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-services.us IDENTIFIED BY 'Lv_duvmQ' WITH GRANT OPTION' at line 1
    Waiting for mysql to restart..............finished.

    root 7419 0.0 0.0 2412 1096 ? S 16:04 0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/domain.com.pid
    mysql 7458 0.0 0.3 74692 6668 ? Sl 16:04 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/domain.com.pid --skip-external-locking --socket=/var/lib/mysql/mysql.sock

    mysql started ok

    Done
     
    #9 katmai, Sep 19, 2007
    Last edited: Sep 19, 2007
  10. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Looks like you have a - in your hostname. This is a known issue with the Remote Setup wizard. Note, I'm only guessing that because of this particular message:

    This means the GRANT statement is failing, you'll need to log into the remote server and execute it manually.

    Code:
    GRANT ALL PRIVILEGES ON *.* to root@server2 IDENTIFIED BY 'Lv_duvmQ' WITH GRANT OPTION;
    /code]
    
    Replace server2 with the actual hostname.
     
  11. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    526
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Brno, Czech Republic
    the /root/.my.cnf password was not updated. i updated it with the db server root pass, and everything works now. eximstats too :)
     
Loading...

Share This Page