Page 1 of 2

Conexión a BD MySql remota

Posted: Thu May 02, 2019 7:55 pm
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 3435 times
base-2.png
base-2.png (105.23 KiB) Viewed 3435 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.

Re: Conexión a BD MySql remota

Posted: Thu May 02, 2019 8:12 pm
by serge_girard
Eduardo,

Check if your IPaddress is allowed to access remote.

Serge

Re: Conexión a BD MySql remota

Posted: Fri May 03, 2019 3:51 am
by dragancesu
Ask your hosting provider

It's disable by default, enable only connect by localhost, your php work on localhost

Re: Conexión a BD MySql remota

Posted: Fri May 03, 2019 1:19 pm
by edufloriv
Good morning friends,

I first get my ip address:
myipaddress.png
myipaddress.png (319.67 KiB) Viewed 3378 times
Then I configure at cpanel like this
anfitrion.png
anfitrion.png (110.35 KiB) Viewed 3378 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 3378 times
Entonces lo configuro en cpanel asi
anfitrion.png
anfitrion.png (110.35 KiB) Viewed 3378 times
Por favor, confírmenme que está bien, así llamaré a mi proveedor de alojamiento.


Saludos cordiales,

Re: Conexión a BD MySql remota

Posted: Fri May 03, 2019 2:32 pm
by serge_girard
Looks OK to me!
Serge

Re: Conexión a BD MySql remota

Posted: Fri May 03, 2019 8:50 pm
by zolysoftsolutions
Hi,
Try to make this setting in your cPanel.
dbremote.png
dbremote.png (22.58 KiB) Viewed 3336 times
Zoli B.

Re: Conexión a BD MySql remota

Posted: Sat Sep 21, 2019 2:04 pm
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 3044 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 3044 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.

Re: Conexión a BD MySql remota

Posted: Sat Sep 21, 2019 4:04 pm
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

Re: Conexión a BD MySql remota

Posted: Sun Sep 22, 2019 5:14 am
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."

Re: Conexión a BD MySql remota

Posted: Sun Sep 22, 2019 7:48 am
by serge_girard
For initial load better use LOAD statement instead of a FOR .. INSERT INTO.. NEXT..

Serge