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!

MySQL Profiles: user app migration to using remote server

Discussion in 'Database Discussion' started by Souther, Jun 21, 2017.

  1. Souther

    Souther Registered

    Joined:
    Jun 21, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    San Jose, CA
    cPanel Access Level:
    Root Administrator
    I have managed to successfully setup a new MySQL profile for a dedicated MariaDB 10.x server which I have running nearby my main WHM/cPanel server. I activated the new profile and all system database usage switched over to the new server with few issues.

    However, user web apps (PHP) running on the main server which reference 'localhost' for database access are still hitting the main server instead of the server associated with the MySQL Profile. I have tried forcing these to use the server's hostname instead of 'localhost' as the hostname, and all this did was break access with the database.

    What am I missing?
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,896
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Could you let us know the contents of your /root/.my.cnf (excluding the actual password and remote host) file and your /etc/my.cnf file?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Souther

    Souther Registered

    Joined:
    Jun 21, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    San Jose, CA
    cPanel Access Level:
    Root Administrator
    /root/.my.cnf on cPanel server
    Code:
    [client]
    user=root
    password=****
    port=3306
    host=******
    /etc/my.cnf on cPanel server
    Code:
    [mysqld]
    innodb_file_per_table=1
    default-storage-engine=InnoDB
    performance-schema=0
    max_allowed_packet=268435456
    query_cache_type=1
    thread_cache_size=4
    innodb_buffer_pool_size=8G
    innodb_log_file_size=2G
    innodb_buffer_pool_instances=8
    innodb_log_buffer_size=4G
    read_rnd_buffer_size=256K
    sort_buffer_size=2M
    query_cache_size=4M
    query_cache_limit=1M
    max_connections = 500
    tmp_table_size = 12M
    max_heap_table_size = 12M
    join_buffer_size = 512K
    general_log = 0
    slow-query-log = 1
    slow-query-log-file = /var/log/mysql-slow.log
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,896
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    I don't see anything in those files that suggest an issue with the remote MySQL profile's configuration. Could you also let us know the contents of the /etc/hosts file on your system (ensuring to remove actual domain names and IP addresses)?

    Thanks.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Souther

    Souther Registered

    Joined:
    Jun 21, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    San Jose, CA
    cPanel Access Level:
    Root Administrator
    /etc/hosts on cPanel server

    Code:
    127.0.0.1               localhost localhost.localdomain localhost4 localhost4.localdomain4
    ::1             localhost localhost.localdomain localhost6 localhost6.localdomain6
    xxx.xxx.xxx.114          thishostname.host.com thishostname
    no entry for server referenced in MySQL profile...
     
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,896
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Could you open a support ticket using the link in my signature so we can take a closer look?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Souther

    Souther Registered

    Joined:
    Jun 21, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    San Jose, CA
    cPanel Access Level:
    Root Administrator
    Your Support Request ID is: 8635897
     
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