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 server IP change issue

Discussion in 'Database Discussions' started by rasa, Jul 31, 2016.

Tags:
  1. rasa

    rasa Active Member

    Joined:
    Feb 17, 2013
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hello everybody
    i hope you having grate time in any where you are in


    today i get a new server for Our remote and dedicated database server ( DB server is Esxi VM )
    i Cloned the DB server after shut it it down to new server and change THe ip address of the CentOS ( VM )

    DB server hostname : dbs1.domain.com
    Server hostname : hosting.domain.com
    Server IP : 1.2.3.4
    DB Server IP : 2.3.4.5
    New IP after Clone to new server : 3.4.5.6

    ive switched DB to local From Mysql Profile and removed Remote server profile
    than i re add DB server with new password
    before this i reset the MariaDB ( on remote server )root user password because of forget that !
    also ive updated DB Server host name IP (2.3.4.5) in /etc/hosts file with new DB server Ip (3.4.5.6) address and also i did the same on DB Server

    here is the strange thing
    when i shut down the OLD server and did change ips and reboot both cpanel and remote db server
    also ive checked /root/.my.cnf and /root/.my.cnf.remote hostname and user pass and eved added [host=3.4.5.6] additional to host=dbs1.domain.com
    i can ping hostname for db server and cpanel server form each server to correct ip !
    also when i add remote profile it connect to hostname and do all updates and system apps databases change
    also i could connect to phpmyadmin and see all databases from root or even open specific databases from user Cpanel
    i also white-listed new DBserver ip on hosting server CSF ( the same was applied on DB server for IP of hosting server )
    but on websites all of them get database connection error ! ( 110 Connection Timeout )

    this mean they could not reach new database server when phpmyadmin could reach it on same server

    right after i trun old server ON websites back to working condition without problem ( and for the website that i changed db password on new server and updated its config i get access denied erro instead of working condition on old DB server or Connection time out on New server )

    it seems something prevent websites acknowledge new dbserver Ip address( they all set hostname as DBServer so when i change Ip address of host name they most connect to new Ip and server )

    is there any thing missing in my steps and configuration ?
     
    #1 rasa, Jul 31, 2016
    Last edited by a moderator: Jul 31, 2016
  2. rasa

    rasa Active Member

    Joined:
    Feb 17, 2013
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    tonight ive tested again
    create another clone with a new IP !
    result is the same ( i dont expect change in result !!! )
    what kind of cache websites may use to query host names to old ips ?!
     
  3. rasa

    rasa Active Member

    Joined:
    Feb 17, 2013
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    ive tried Ip address instead of host name in wordpress configurations !
    and every thing worked like normal
    cpanel to db server connection is working
    i cannot update all websites host name for db server to ip


    there must be a cache software
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    649
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    Check to see if the new server's hostname resolves to the correct IP address from the cPanel server with commands such as:

    Code:
    host host.remote-mysql-server.com
    ping host.remote-mysql-server.com
    Does it resolve to the correct IP address?

    Thank you.
     
Loading...

Share This Page