erpnext@erpnext-vm:~$ cd /home/erpnext/frappe-bench
erpnext@erpnext-vm:~/frappe-bench$ bench frappe --mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 1496
Server version: 5.5.40-MariaDB-1~wheezy-log mariadb.org binary distribution
Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [erpnext]> SELECT User, Host FROM mysql.user WHERE Host <> 'localhost';
ERROR 1142 (42000): SELECT command denied to user 'erpnext'@'localhost' for table 'user'
MariaDB [erpnext]>
Finally!
So the complete procedure for anyone looking to connect to ERPNext database from outside is:
edit my.conf (/etc/mysql/my.cnf)
uncomment line 47 (#bind-address = localhost)
connect as root (password âerpnextâ) via putty and execute:
cd frappe-bench
mysql -uroot -perpnext
GRANT ALL PRIVILEGES ON . TO ârootâ@â%â IDENTIFIED BY âerpnextâ WITH GRANT OPTION;
service mysql restart
Thatâs it! Now you can connect to ERPNext database from an external PC via Navicat or other db manager of your choice.
hi I have installed ERP Next on VM now i need a remote pos client to connect with it via internet and sync all day invoices with the same. is this possible to do
Yourâe close aiqual - after you login, you need to specify the âmysqlâ database. For example:
frappe@erpnext:~/frappe-bench$ mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 100
Server version: 10.0.29-MariaDB-1~trusty mariadb.org binary distribution
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
Type âhelp;â or â\hâ for help. Type â\câ to clear the current input statement.
MariaDB [(none)]> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
I resolved the problem by installing Bitvise SSH client on Windows and tunneled into the VirtualBox VM port 3306. Then the MySQL Workbench could connect to this same port.
Took me a while to get MySQL Workbench connected to the database running in the ERPnext Virtual Box VM. I had to:
Add a port forwarding rule into VirtualBox for my virtual machine to point to 3306
Change the /etc/mysql/my.cn to allow connections from all hosts (bind-address = 0.0.0.0)
Update the user list in MySQL. Actually, i am not certain that i need to do this step. The syntax I used is shown below. The IP address is coming from the Virtual Machine. âfrappeâ is the default password for the VM install of ERPnext.
Just found the perfect solution!!, that requires no config changes!, is a SSL tunnel to bind your remote MYSQL to a local port, so the mysql engine connects as local but the data is forwarded using a tunnel, here is the command in terminal (iâm using MacOS):
ssh -L 3306:127.0.0.1:3306 root@<your remoteIP> -N
Be sure to have ssh access for rootâŠ
The terminal will say nothing but the port is forwarded until you press , so now you can acces your remote mysql with erpnext as local to your machine⊠I used MySQL Workbench smoothly, and no config changes on the remote server⊠So this can be used when needed quick access without spending too much time moving things around (and maybe breaking something on the way)âŠ
Hope this is useful ⊠it can also be used to forward remote erpnext as local, usefun when testing apiâs or whatever use you can imagine⊠is like an reverse Ngrock serviceâŠ
I cannot access my erpnext database outside of 192.168.1.201 linux server.
Iâm usign mobaxterm to access the server. I can connect db using mobaxterm console. but from my local pc I canât connect the db.
how to solve the problem ?
please suggest me.