Conexión a BD MySql remota

HMG en Español

Moderator: Rathinagiri

User avatar
edufloriv
Posts: 238
Joined: Thu Nov 08, 2012 3:42 am
DBs Used: DBF, MariaDB, MySQL, MSSQL, MariaDB
Location: PERU

Conexión a BD MySql remota

Post by edufloriv »

Saludos amigos,

Tengo contratado un host y he creado en el una base de datos MySQL:
base-1.png
base-1.png (116.44 KiB) Viewed 3391 times
base-2.png
base-2.png (105.23 KiB) Viewed 3391 times
Estoy tratando de usar este código para conectarme a ella:

Code: Select all

*------------------------------------------------------------------------------*
*------------------------------------------------------------------------------*
*------------------------------------------------------------------------------*

PROC ConexionRemota

	// Connect

	oServer := TMySQLServer():New("51.254.123.233" , "ago28ind_root" , "clave")

	// Check For Error

	If oServer:NetErr()

		MsgStop(oServer:Error())
		Win_1.Title := 'MySql Basic Sample - Not Connected' 

	Else

      If oServer:NetErr()
         MsgStop(oServer:Error())
      Else
         oServer:SelectDB("ago28ind_infofarma")
         Win_1.Title := 'MySql Basic Sample - Connected' 
      Endif

	EndIf

Return
Pero no se conecta, siempre me sale el mensaje "No connection to server". Agradeceré la ayuda de los que tengan experiencia conectando a bases de datos remotas.


Att.

Eduardo Flores Rivas


LIMA - PERU
User avatar
serge_girard
Posts: 3161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Conexión a BD MySql remota

Post by serge_girard »

Eduardo,

Check if your IPaddress is allowed to access remote.

Serge
There's nothing you can do that can't be done...
User avatar
dragancesu
Posts: 920
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

Re: Conexión a BD MySql remota

Post by dragancesu »

Ask your hosting provider

It's disable by default, enable only connect by localhost, your php work on localhost
User avatar
edufloriv
Posts: 238
Joined: Thu Nov 08, 2012 3:42 am
DBs Used: DBF, MariaDB, MySQL, MSSQL, MariaDB
Location: PERU

Re: Conexión a BD MySql remota

Post by edufloriv »

Good morning friends,

I first get my ip address:
myipaddress.png
myipaddress.png (319.67 KiB) Viewed 3334 times
Then I configure at cpanel like this
anfitrion.png
anfitrion.png (110.35 KiB) Viewed 3334 times
Please confirm me thats ok, so I will call my hosting provider.


Greeting regards,

*----------------------------------------------------------------------------------------------------------------------------------------------------*

Buenos días amigos,

Primero obtengo mi dirección IP:
myipaddress.png
myipaddress.png (319.67 KiB) Viewed 3334 times
Entonces lo configuro en cpanel asi
anfitrion.png
anfitrion.png (110.35 KiB) Viewed 3334 times
Por favor, confírmenme que está bien, así llamaré a mi proveedor de alojamiento.


Saludos cordiales,

Eduardo Flores Rivas


LIMA - PERU
User avatar
serge_girard
Posts: 3161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Conexión a BD MySql remota

Post by serge_girard »

Looks OK to me!
Serge
There's nothing you can do that can't be done...
User avatar
zolysoftsolutions
Posts: 139
Joined: Wed Feb 29, 2012 3:33 am
Location: Gyulakuta, Erdélyország
Contact:

Re: Conexión a BD MySql remota

Post by zolysoftsolutions »

Hi,
Try to make this setting in your cPanel.
dbremote.png
dbremote.png (22.58 KiB) Viewed 3292 times
Zoli B.
_______________________________
Open eyes for you!
User avatar
edufloriv
Posts: 238
Joined: Thu Nov 08, 2012 3:42 am
DBs Used: DBF, MariaDB, MySQL, MSSQL, MariaDB
Location: PERU

Re: Conexión a BD MySql remota

Post by edufloriv »

Hola a todos,

Para informarles que el día de hoy pude conectarme a mi base de datos MySQL via remota. Lo reporto por si alguno tiene un problema similar.

Lo que hice fue comunicarme con mi proveedor de HOST y le indiqué que no podia conectarme a mi base de datos.
Luego me comunique con mi proveedor de fibra óptica y le solicité que libere el puerto 3306. (tenemos un firewall Fortinet).

La verdad es que no sé cual de las dos solicitudes fue la que me permitió conectarme a la base de datos, por fin pude subir mi primera tabla desde mi aplicación de instalación escrita en HMG.

Mi duda ahora es la siguiente, ¿ cual sería el requisito mínimo de ancho de banda que debo solicitar para que mis clientes trabajen optimamente con conexión remota a HOST ?. - Note al subir mi primera tabla que escribir 1,700 registros tomo casi 4 minutos y tengo conexión de fibra óptica de 60mbps.
speedtest.png
speedtest.png (35.08 KiB) Viewed 3000 times
Voy a ponerme a modificar mi código para crear una nueva versión del sistema que comercializo, pues tengo varios clientes que cuentan con sucursales. Para los colegas que tienen experiencia en este ambiente les agradeceré mi brinden un feedback de cual es la manera más optima de trabajar y con que problemas me voy a encontrar durante la implementación.

Cualquier ayuda es agradecida.

-----------------------------------------------------------------------------------------------------------------------------------------------------------

Hello everyone,

To inform you that today I could connect to my MySQL database via remote. I report it in case anyone has a similar problem.

What I did was contact my HOST provider and indicated that I could not connect to my database.
Then I contacted my fiber optic provider and asked him to release port 3306. (We have a Fortinet firewall).

The truth is that I do not know which of the two requests was the one that allowed me to connect to the database, finally I was able to upload my first table from my installation application written in HMG.

My question now is the following, what would be the minimum bandwidth requirement that I must request for my clients to work optimally with a remote connection to HOST? - Note when I upload my first table that writing 1,700 records takes almost 4 minutes and I have a 60mbps fiber optic connection.
speedtest.png
speedtest.png (35.08 KiB) Viewed 3000 times
I'm going to change my code to create a new version of the system that I sell, because I have several clients that have branches. For colleagues who have experience in this environment, I would be grateful for my feedback on what is the most optimal way to work and what problems I will encounter during implementation.

Any help is appreciated.

Eduardo Flores Rivas


LIMA - PERU
franco
Posts: 816
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

Re: Conexión a BD MySql remota

Post by franco »

I am not knowledgeable in this area, as I have never been able to get sql to work (limited time).
Do firewalls have effects in Hosts, I always have to set exceptions in local network firewalls. Also I do not know how sql indexes work
but I find in databases creating local index really speeds up system in terminals.
One day I want to do exactly what you have done.
Franco
All The Best,
Franco
Canada
User avatar
dragancesu
Posts: 920
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

Re: Conexión a BD MySql remota

Post by dragancesu »

The answer is not simple. You are trying to create a cloud. If so, take a look at what speeds and flow rates they offer.

I don't know what kind of connection you have, it's usually asymmetrical, here are 50/5 to 300/30, optics.

You should try this query in another way, say with php, and see how, if it works better then do optimization.

One query and application is a big difference, but "every journey starts with a step."
User avatar
serge_girard
Posts: 3161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Conexión a BD MySql remota

Post by serge_girard »

For initial load better use LOAD statement instead of a FOR .. INSERT INTO.. NEXT..

Serge
There's nothing you can do that can't be done...
Post Reply