Page 1 of 1
					
				Mydac on OSX not connecting.
				Posted: Wed  28 Jan 2015 10:02
				by toolfolks
				I am testing and can run a simple database app on windows.
I have compiled to OSX and get 'cannot connect to mysql server on XXXX'.
I have install mysql server on the mac (hoping this installed the necessary bits and pieces).
Is there some equivalent of dlls I have to add?
Thanks....
			 
			
					
				Re: Mydac on OSX not connecting.
				Posted: Wed  28 Jan 2015 12:45
				by ViktorV
				If you are using Direct Mode in MyDAC (TMyConnection.Options.Direct property is True), no third-party libraries for connection to MySQL server are needed. The error may be due some restrictions on the PC with installed MySQL server or OSX (antivirus or firewall can block incoming or outgoing connections or ports, incorrect MySQL server configuration, etc.).
			 
			
					
				Re: Mydac on OSX not connecting.
				Posted: Thu  29 Jan 2015 12:07
				by toolfolks
				I am trying to connect to a remote mysql database from a mac not mysql on the local machine.
I installed mysql server in the hope it cured the problem I am having.
The TMyConnection.Options.Direct property is True
I have 3 different macs.
None of them have firewall switched on.
None have antivirus.
I am able to use SequelPro ( mysql database management ) on each machine.
I can connect to all my databases with this okay.
Is there anyway I can trace where its failing?
			 
			
					
				Re: Mydac on OSX not connecting.
				Posted: Thu  29 Jan 2015 14:13
				by ViktorV
				Please create an empty project and run the following code:
Code: Select all
var
  con: TMyConnection;
begin
  con := TMyConnection.Create(nil);
  try
    con.Server := Server;
    con.Port := 3306;
    con.Username := User;
    con.Password := Password;
    con.Database := Database;
    con.LoginPrompt := False; 
    con.Open;
    if con.Connected then ShowMessage('Connected!')
  finally
    con.Free;
  end;
Note, that to run this code, you should add the MyAccess unit to the USES clause of your unit.
If you get an error on this code execution, please specify its full message.
 
			 
			
					
				Re: Mydac on OSX not connecting.
				Posted: Fri  30 Jan 2015 15:03
				by toolfolks
				On windows it connects ok.
On Mac I get cannot connect to MYSQL server on 
www.mydomain.com (10061).
Thanks.
 
			 
			
					
				Re: Mydac on OSX not connecting.
				Posted: Fri  30 Jan 2015 15:37
				by toolfolks
				I have just tested on another mac.
It connected okay.
I then quit the app and re-launched and get can't connect.
10061.
Re started the mac and can't connect (10061).
			 
			
					
				Re: Mydac on OSX not connecting.
				Posted: Mon  02 Feb 2015 12:59
				by ViktorV
				To investigate the problem, please execute the following code and let us know the results:
Code: Select all
var
  VioTCP: TCRVioTCP;
begin
  VioTCP := TCRVioTCP.Create;
  try
    VioTCP.Host := Server;
    VioTCP.Port := Port;
    VioTCP.Timeout := 0;
    if VioTCP.TryConnect then
      ShowMessage('OK')
    else
      ShowMessage('Error: ' + VioTCP.LastError+ #$D#$A'Code: ' + 
        IntToStr(VioTCP.LastErrorCode));
  finally
    VioTCP.Free;
  end;
end;
Note, that to run this code, you should add the CRVioTCP unit to the USES clause of your unit.
 
			 
			
					
				Re: Mydac on OSX not connecting.
				Posted: Thu  12 Feb 2015 10:21
				by toolfolks
				Hi,
On the PC I am getting:
Error: Cannot connect to server on host '
www.wilsea.com':
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Socket Error Code: 10060($274C)
Code: 10060
On Mac I am getting :
Error: Cannot connect to server on host '
www.wilsea.com':
operation timed out.
Socket Error Code: 60($3C)
Code: 60
 
			 
			
					
				Re: Mydac on OSX not connecting.
				Posted: Thu  12 Feb 2015 11:13
				by ViktorV
				Please check whether you can connect to the host: ensembldb.ensembl.org.
Code: Select all
  VioTCP.Host := 'ensembldb.ensembl.org';
  VioTCP.Port := 3306;
 
			 
			
					
				Re: Mydac on OSX not connecting.
				Posted: Thu  12 Feb 2015 11:45
				by toolfolks
				Hi,
Same error on PC & mac .
			 
			
					
				Re: Mydac on OSX not connecting.
				Posted: Thu  12 Feb 2015 12:30
				by ViktorV
				Please check whether you can connect to the host ensembldb.ensembl.org using Telnet:
Code: Select all
  telnet.exe ensembldb.ensembl.org 3306
 
			 
			
					
				Re: Mydac on OSX not connecting.
				Posted: Thu  12 Feb 2015 13:06
				by toolfolks
				On PC I get:
Some garbled text
then Connection to host lost
On Mac I get :
Similar garbled text
then connection closed by foreign host
			 
			
					
				Re: Mydac on OSX not connecting.
				Posted: Fri  13 Feb 2015 13:14
				by ViktorV
				Please check whether you can connect to the host ensembldb.ensembl.org by specifying its IP address:
You have written earlier that you could connect to MySQL server from Windows, now you are writing that you can connect neither to OSX nor to Windows. Maybe there were some changes, for example, in the network configuration.