How to configure a separate Database server for ERPNext

455 views
Skip to first unread message

Haris Khan

unread,
Nov 13, 2013, 1:51:51 AM11/13/13
to erpnext-dev...@googlegroups.com
I want to install ERPNext files on one server and MySQL Database on a separate server. Please tell the location of configuration file and the parameters to add.

Thanks.

CJ

unread,
Nov 13, 2013, 5:36:52 AM11/13/13
to erpnext-dev...@googlegroups.com
Yes please, I am interested to know too.

Maxwell Morais

unread,
Nov 13, 2013, 6:28:25 AM11/13/13
to erpnext-dev...@googlegroups.com

​P​
lease, see my configuration

gunicorn.conf for supervisor

[program:gunicorn_mxmo]
command=gunicorn -b 127.0.0.1:7999 -w 2 lib.webnotes.app:application
directory=home/apra/mxmo
process_name=%(program_name)s
autostart=True
autorestart=True
redirect_stderr=True

[program:gunicorn_realize]
command=gunicorn -b 127.0.0.1:8000 -w 2 lib.webnotes.app:application
directory=/home/apra/next
user=erpnext
process_name=%(program_name)s
autostart=True
autorestart=True
redirect_stderr=True

[program:gunicorn_demo]
command=gunicorn -b 127.0.0.1:8001 -w 2 lib.webnotes.app:application
directory=/home/apra/demo
process_name=%(program_name)s
autostart=True
autorestart=True
redirect_stderr=True

erpnext-mxmo.conf

upstream erpnextmxmo {
​​
    server 127.0.0.1:7999 fail_timeout=0;    
}

server  {
    listen         80;
    server_name    $hostname;
    client_max_body_size 4G;
    server_name localhost;
    keepalive_timeout 5;
    root /home/maxwell/mxmo;

    location / {
        try_files $uri @magic;
    }

    location @magic {
        proxy_set_header X-Forwaded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_redirect off;
        proxy_pass http://erpnextmxmo;
    }
}

erpnext-realize.conf

upstream erpnextrealize {
    server 127.0.0.1:8000 fail_timeout=0;    
}

server  {
    listen         8080;
    server_name    $hostname;
    client_max_body_size 4G;
    server_name localhost;
    keepalive_timeout 5;
    root /home/maxwell/next/public;

    location / {
        try_files $uri @magic;
    }

    location @magic {
        proxy_set_header X-Forwaded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_redirect off;
        proxy_pass http://erpnextrealize;
    }
}

erpnext-demo.conf

upstream erpnextdemo {
    server 127.0.0.1:8001 fail_timeout=0;    
}

server  {
    listen         8081;
    server_name    $hostname;
    client_max_body_size 4G;
    server_name localhost;
    keepalive_timeout 5;
    root /home/apra/demo;

    location / {
        try_files $uri @magic;
    }

    location @magic {
        proxy_set_header X-Forwaded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_redirect off;
        proxy_pass http://erpnextdemo;
    }
}


2013/11/13 CJ <joven...@gmail.com>

--
Note:
 
If you are posting an issue,
1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
 
End of Note
---
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--

Maxwell Morais
Tecnologia da Informação

Maxwell Morais

unread,
Nov 13, 2013, 6:36:43 AM11/13/13
to erpnext-dev...@googlegroups.com
​I'm sorry, this response is to another thead​



2013/11/13 Maxwell Morais <max.mor...@gmail.com>

​​


陈斌

unread,
Mar 3, 2014, 4:23:30 AM3/3/14
to erpnext-dev...@googlegroups.com
1. use lib/wnf.py --backup for backup the database
2. import the backuped database to the mysql server
3. create a user on the mysql server
4. modify erpnext/conf.py:
    a. add db_host = '<mysql server ip>'
    b. update the db_name and db_password as the new one.
5. start the erpnext server and try
6. if you created mysql user can't connect the DB, see the error message and create another one that match the error message mentioned user and host
 
I've tried these steps, only the error that the user@host is wrong. Just create a user with right host.
 
BTW, if you want to user the local DB, just comment out the db_host line.
Reply all
Reply to author
Forward
0 new messages