• brockangelo

    (@brockangelo)


    Looking for someone who has played around with Webmin in Ubuntu enough to answer this question:

    I setup a second ubuntu box just for mysql and imported my database into it. I’d like to learn how to have wordpress on one box and the db on another box.

    I can ping the sql box from my primary web server. But when I switch wp-config to the db box’s local ip address (192.168.1.3) it give the ‘error establishing db connection’. Which of course means that I’m not connecting to the box.

    Do I need to set anything up so that the two boxes can talk to each other? It is listening on the default port (3306) and I’ve tried listening on the 127.0.0.1 IP and at 192.168.1.3 IP with no luck.

    User permissions are the same as on the other box. Just ran out of ideas, as I am stumped.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter brockangelo

    (@brockangelo)

    Okay, I found this, so I’m posting for anyone else who is stumped by this. It is easily resolved, but here is the detailed version to make sure we’re on the same page:

    On the new box where you are going to have your db running, in Webmin, under Servers, in the MySQL Database Server section, click on User Permissions.

    By default this gives you Anonymous & Root as users who have permission to use your db’s. I added an account that I use for connecting to my databases, so I have an additional account in here (you should too). There are a few columns on the User Permissions page: User, Host, Password Hash, & Permissions.

    My user had permission set to All (so he can do anything to the db – could also remove a few of those for security). I also had the host set to “localhost”. (cue the buzzer) The host that will connect to this database is coming from a different server, not the localhost. So I add the IP address of the machine that wordpress is on and it works.

    Thread Starter brockangelo

    (@brockangelo)

    I guess I can’t resolve this post… ??
    RESOLVED

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘moving sql to separate box’ is closed to new replies.