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.

CPanel - mysql clustering

Discussion in 'Bind / DNS / Nameserver Issues' started by sowell, Jun 26, 2007.

  1. sowell

    sowell Member

    Joined:
    Jun 26, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Is it possible with cpanel to do mysql clustering where sql will reside on a server outside the webhosting environment??? Would it even make sense to do such a thing?

    We are in the midst of trying to configure a scalable, easy to use solution and we are extremely interested in cpanel so i am just curious if this is possible.



    </firstpost>
     
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    its posible
     
  3. hostmedic

    hostmedic Well-Known Member

    Joined:
    Apr 30, 2003
    Messages:
    559
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Washington Court House, Ohio, United States
    cPanel Access Level:
    DataCenter Provider
    Very Easy

    In short - this is very simple to do.

    What you would do - is add a server into your network with a private IP
    add a private IP into your local machine - (suggest a gigabit connection :) but thats just me )

    now go into WHM and setup a remote SQL server...


    You can change the MySQL server from the local server ("localhost") to point to a remote server. This allows MySQL functions to be performed by another computer.


    Steps

    1 To access the SQL Services Menu, click on SQL Services, on the main screen of your WebHost Manager interface.

    2 Click on Setup Remote MySQL server.

    3 Enter the name (or ip) of the remote server in the Remote MySQL Host field and its password in the Remote Mysql Host's Root Password field.

    NOTE: Do not enter the root password for the remote MySQL server in the Remote MySQL Host's Root Password field.

    4 Click on Setup.
     
  4. hostmedic

    hostmedic Well-Known Member

    Joined:
    Apr 30, 2003
    Messages:
    559
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Washington Court House, Ohio, United States
    cPanel Access Level:
    DataCenter Provider
    btw welcome

    By the Way - welcome to the community -
     
  5. hostmedic

    hostmedic Well-Known Member

    Joined:
    Apr 30, 2003
    Messages:
    559
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Washington Court House, Ohio, United States
    cPanel Access Level:
    DataCenter Provider
  6. sowell

    sowell Member

    Joined:
    Jun 26, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    thanks ALOT for the detailed reply and help. If this is the way things go around here I'm glad to be a part. again homedic thanks for the reply.
     
  7. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
  8. hostmedic

    hostmedic Well-Known Member

    Joined:
    Apr 30, 2003
    Messages:
    559
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Washington Court House, Ohio, United States
    cPanel Access Level:
    DataCenter Provider
  9. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Yes we did record the presentations. They are currently undergoing post-production processing.
     
  10. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    983
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    If a new domain is added to the main server, or a new DB is created by a cuser, will it automatically be created / replicated on the other server?
     
  11. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Once the Remote DB setup is performed, new databases, database users, etc, will be done on the remote server, not the local one (barring bugs).
     
  12. expedio

    expedio Active Member

    Joined:
    Jun 30, 2007
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    Do you need only mysql cluster, or are interested in fully redundant cpanel servers?
     
  13. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    526
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Brno, Czech Republic
    small question. if the mysql is under heavy usage. how will i make 2 servers clustered to handle the mysql load? i mean .. the same database.
     
  14. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    It kind of depends upon the level of complexity you want. Generally speaking it would involve a threee server setup:

    Two MySQL servers
    One proxy server

    Along with customizing the application because such a setup would likely use Replication which mandates that data modification only happen on one server, the Master. Hence the application would need customized to send INSERT, UPDATE and DELETE type statements to the Master, while SELECT type statements would go to the proxy server for load balancing. Hopefully your application does far more SELECTing than UPDATEing.

    You might checkout http://forge.mysql.com/wiki/MySQL_Proxy for info about a proxy, or http://haproxy.1wt.eu/ for a more generalized solution. Also, it is possible to do soemthing like combinae the Master MySQL and Proxy onto one server.

    It's really difficult to give a pat answer to these types of questions because:

    1) There are numerous ways to reach the stated goal

    2) The particular requirements should be fully defined - which can be difficult to convey on a Forum


    Anyway, if the videos from the Seminar are posted, look for my presentation on MySQL replication and clustering.
     
  15. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    526
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Brno, Czech Republic
    i was checking it now. thanks for the tips, i will be reading into this and see what i can come up with :)
     
  16. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    You're welcome. We are always here for Q & A. There might be some weak areas with the presentation, since it was originally to be 30 min, but was redone for a 60 min time slot a couple days before the seminar :D (love scheduling, so much fun ;))

    One thing I mentioned in a prior thread is we will be removing the current way of mapping MySQL database names to the cPanel account name. When and how this will happen is unknown, but once it happens it will simplify this entire topic.
     
  17. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    526
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Brno, Czech Republic
  18. big

    big Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    224
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Earth
    how can mysql -h localhost work ?

    because all users have 'localhost' in their config.php files for their applications and now they are all down

    mysql -h 192.168.2.10 is working just fine but not mysql -h localhost or mysql -h 127.0.0.1
     
  19. big

    big Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    224
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Earth
    also all users in the mysql "user" table are granted access with 'localhost' not the other server IP

    how to automatically fix it?
     
  20. debiannerd

    debiannerd Registered

    Joined:
    Mar 22, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
Loading...

Share This Page