Connecting via HTTP tunnel by PHP - libmysql.dll error
Connecting via HTTP tunnel by PHP - libmysql.dll error
Hi!
I get this error when I'm trying to connect to database using http tunnel:
"MySQL client library couldn't be loaded. Please place libmysql.dll file to system folder (included to PATH) or to the folder with executable unit of main program."
My configuration of TMyConnection looks like this:
HttpOptions / Url = http://www.mydomain.com/tunnel.php
Options / Protocol = mpHttp
Port: 3306
Server: localhost
File tunnel.php is placed on server and it generates some entries on _connections.id.
My operation system is Windows 7 x64.
I also have the newest version of libmysql.dll In the system folder and the project folder.
Any ideas?
I get this error when I'm trying to connect to database using http tunnel:
"MySQL client library couldn't be loaded. Please place libmysql.dll file to system folder (included to PATH) or to the folder with executable unit of main program."
My configuration of TMyConnection looks like this:
HttpOptions / Url = http://www.mydomain.com/tunnel.php
Options / Protocol = mpHttp
Port: 3306
Server: localhost
File tunnel.php is placed on server and it generates some entries on _connections.id.
My operation system is Windows 7 x64.
I also have the newest version of libmysql.dll In the system folder and the project folder.
Any ideas?
The php script is available through the HTTP protocol.
When I use it's address in borwser I get this message:
"HttpTunnel v1.5
Tunnel script is installed correctly.
You can establish connections through the HTTP tunnel."
I even tried to install script on another machine in my local network (http://192.168.0.3/tunnel.php) - still the same error:
"Can't connect to MySQL server on 'localhost' (10061)
Socket error on read. WSAGetLastError return 10060($274C)."
This is detailed configuration of my TMyConnection component:
ConnectDialog =
ConnectionTimeout = 15
Database = tunnel
HttpOptions / Password =
ProxyOptions = (...all options are set to default)
HttpOptions / Url = http://192.168.0.3/tunnel.php
HttpOptions / Username =
IOHandler =
IsolationLevel = ilReadCommited
Options / CheckBackslashes = False
Options / Compress = False
Options / Direct = True
Options / DisconnectedMode = False
Options / Embedded = False
Options / LocalFailover = False
Options / Protocol = mpHttp
Password = mypassword
Pooling = False
Port = 3306
Server = localhost
SSLOptions = (...all options are set to default)
Username = myusername
Any ideas?
When I use it's address in borwser I get this message:
"HttpTunnel v1.5
Tunnel script is installed correctly.
You can establish connections through the HTTP tunnel."
I even tried to install script on another machine in my local network (http://192.168.0.3/tunnel.php) - still the same error:
"Can't connect to MySQL server on 'localhost' (10061)
Socket error on read. WSAGetLastError return 10060($274C)."
This is detailed configuration of my TMyConnection component:
ConnectDialog =
ConnectionTimeout = 15
Database = tunnel
HttpOptions / Password =
ProxyOptions = (...all options are set to default)
HttpOptions / Url = http://192.168.0.3/tunnel.php
HttpOptions / Username =
IOHandler =
IsolationLevel = ilReadCommited
Options / CheckBackslashes = False
Options / Compress = False
Options / Direct = True
Options / DisconnectedMode = False
Options / Embedded = False
Options / LocalFailover = False
Options / Protocol = mpHttp
Password = mypassword
Pooling = False
Port = 3306
Server = localhost
SSLOptions = (...all options are set to default)
Username = myusername
Any ideas?
Dimon, please try to connect to our public MySQL database (made for this test) using this settings:
PHP script: http://devel.wi.net.pl/tunnel/tunnel.php
Database: tunnel
User: tunnel
Pass: tunnel
let me know whether the test was a success.
Other solutions that use the HTTP tunnel by PHP works correctly. This solution is SQLyog (http://www.webyog.com/) tunnel file is available here
http://devel.wi.net.pl/tunnel/SQLyogTunnel.php
PHP script: http://devel.wi.net.pl/tunnel/tunnel.php
Database: tunnel
User: tunnel
Pass: tunnel
let me know whether the test was a success.
Other solutions that use the HTTP tunnel by PHP works correctly. This solution is SQLyog (http://www.webyog.com/) tunnel file is available here
http://devel.wi.net.pl/tunnel/SQLyogTunnel.php
Hi!
Same problem here too.
When I try to connect via tunnel It throws error message saying
"Can't connect mysql server on localhost ......."
also with Navicat I can connect http tunnel without any problem.
httptunnel_server.log
11.04.2010 19:18:18 - Connected to remote localhost: 3306
11.04.2010 19:18:18 - Waiting for client...
any solution?
Same problem here too.
When I try to connect via tunnel It throws error message saying
"Can't connect mysql server on localhost ......."
also with Navicat I can connect http tunnel without any problem.
httptunnel_server.log
11.04.2010 19:18:18 - Connected to remote localhost: 3306
11.04.2010 19:18:18 - Waiting for client...
any solution?
Hi,
I get the same error message:
"Can't connect to MySQL server on 'localhost' (10061)
Socket error on read. WSAGetLastError return 10060($274C)."
Content of log file:
11.04.2010 19:56:59 - Connected to remote localhost: 3306
11.04.2010 19:56:59 - Waiting for client...
No problem via http tunnel with Navicat.
Hope you can help.
I get the same error message:
"Can't connect to MySQL server on 'localhost' (10061)
Socket error on read. WSAGetLastError return 10060($274C)."
Content of log file:
11.04.2010 19:56:59 - Connected to remote localhost: 3306
11.04.2010 19:56:59 - Waiting for client...
No problem via http tunnel with Navicat.
Hope you can help.
I replaced all 'MSG_WAITALL' to '0' - but still no success.
I found 2 entries in php file:
1.
"$read = socket_recv($socket, $readBuffer, $count, MSG_WAITALL);"
changed to:
"$read = socket_recv($socket, $readBuffer, $count, 0);"
2.
"$readCount = socket_recv($rmsock, $buffer, $MaxReadCount, MSG_WAITALL);"
changed to:
"$readCount = socket_recv($rmsock, $buffer, $MaxReadCount, 0);"
I found 2 entries in php file:
1.
"$read = socket_recv($socket, $readBuffer, $count, MSG_WAITALL);"
changed to:
"$read = socket_recv($socket, $readBuffer, $count, 0);"
2.
"$readCount = socket_recv($rmsock, $buffer, $MaxReadCount, MSG_WAITALL);"
changed to:
"$readCount = socket_recv($rmsock, $buffer, $MaxReadCount, 0);"
same result here no success.
I replaced all 'MSG_WAITALL' to '0' - but still no success.
I found 2 entries in php file:
1.
"$read = socket_recv($socket, $readBuffer, $count, MSG_WAITALL);"
changed to:
"$read = socket_recv($socket, $readBuffer, $count, 0);"
2.
"$readCount = socket_recv($rmsock, $buffer, $MaxReadCount, MSG_WAITALL);"
changed to:
"$readCount = socket_recv($rmsock, $buffer, $MaxReadCount, 0);"