Database access on Virtual machine

am using the virtual machine to manage erp next…but i want to make integration with fingerprint attendance machine and POS machine so i want to access the mysql database…is there a way to view the database and its tables?thanks

2 Likes

Use SSH tunneling with your favourite GUI and/or terminal app.
If you’re on WinX, try putty+HeidiSQL (both free) - something like this work 100% - just tune the address:port, and user/pwd settings to your requirements

@trentmu thanks for your replay,but couldnt find the plink software with GUI(which i download does not have the same GUI with the above pic you posted)…so please tell me the exact version and name of software which you are using.thanks in advance!

The screenshots are from HeidiSQL,
The plink is part of the PuTTY software.
and is used to create the tunnel

@trentmu so should i download both or what?

If you run windows, and don’t have a terminal app and a mysql gui app, then I recommend these 2 - they are small, free and good.

hey @fikerjayz,
I am assuming you know how to access a MariaDB/MySQL server running in you local machine.
Hence, I assume you question is “How to access the “MariaDB server” running in a ERPNext VM?”

  • The ERPNext VM runs a standard MariaDB server on the standard port 3306 with default setting with respect to access control settings

  • The question then becomes two parts: (assuming you want to access the db server from a machine other than your VM)
    a) how to enable Remote Client Access for MariaDB
    b) how to access the port 3306 of your VM

Answer to (a):
Please follow this link. :smiley:

Answer to (b):
It depends on your network Adapter settings of you VM in you VirutualBox.
Case 1: NAT - you need to add the 3306 port in “Port Forwarding” option.
Case 2: Bridged Adapter - you can access the port directly at the IP addressed of your VM

Note: This is the path I went down when I was exploring ERPNext a few weeks ago. Hope this is you requirement. Else, I guess it will help others going down the same path.

1 Like

Integrating any application by accessing database directly is asking for trouble. You should be looking at relevant REST APIs.

The easiest way I found under windows was to download MySQL ODBC connector:
https://dev.mysql.com/downloads/connector/odbc/

You then have to allow access to your DB from outside the local network of your VM. Then I created a new user and granted the permissions to access the DB on my VM. I used this user in the MySQL ODBC connector settings.

I am using Microsoft Power BI, AutoTAG reporting engine and MySQL Workbench with the connector and it runs perfectly!

G.