distal-attribute
distal-attribute
distal-attribute
distal-attribute

SQLerror2005

User, date Message
Written by howardnelson
4 years ago
Category: Creating a connection
9 posts since Mon, 15 Nov 10
I have had MySQLFront version 3.2 (Build 7.5) on my old computer, and am trying to install HeidiSQL on my new one. The format for the location of my remote database on the old computer is "mysql://mysql02.iomart.com" but both this and "mysql02.iomart.com" produce this error message: "SQL Error 2005: Unknown MySQL server host". What format should I be using for the host name?

I have looked back at earlier posts in this section of the forum and most connection problems seem to start a bit later in the process, with Username and password issues ...
Written by ansgar
4 years ago
4940 posts since Fri, 07 Apr 06
mysql02.iomart.com looks ok, while mysql://mysql02.iomart.com looks like some extended protocol feature of MySQL Front 3. Could be your MySQL Front communicated via HTTP tunnel with that server because it did not allow network connections. HeidiSQL does not support HTTP tunneling, only SSH tunnel.
Written by howardnelson
4 years ago
9 posts since Mon, 15 Nov 10
Thanks Anse: you're right, the old system used an HTTP tunnel: the url was http://www.domainname/phpMySQL.php . I've set my session manager to SSH tunnel with mysql02.iomart.com/ as the Host, but get this error message: "Couldn't execute PLink: mysql02.iomart.com/ -P 22 -L 3307: mysql02.iomart.com/ 3306"

Would you kindly advise me what format the Host name should have for an SSH tunnel connection?
Written by ansgar
4 years ago
4940 posts since Fri, 07 Apr 06
Did you download Plink.exe ?
Written by ansgar
4 years ago
4940 posts since Fri, 07 Apr 06
And even more important: Can the server be reached via SSH? You can check that using putty.exe.
Written by howardnelson
4 years ago
9 posts since Mon, 15 Nov 10
OK, I've downloaded putty.exe, and using the address mysql02.iomart.com I get a black screen with a green box in the top left corner, but nothing I type appears on the screen. On the other hand, if I make a deliberate error in the host name, I am (correctly) told that the host doesn't exist. So it looks as if it is recognising the host.

I've also dowenloaded PLink, but when I click to run it, I get a flash of somethiig on the screen, then nothing. And trying the Heidi connection again produces the same error message about not being able to execute Plink. Maybe I should be storing PLink somewhere other than Downloads - Program Files?
Written by ansgar
4 years ago
4940 posts since Fri, 07 Apr 06
Sounds like you didn't tell HeidiSQL where plink.exe is located?

May all be hopeless if you do not get any SSH response using putty.
Written by howardnelson
4 years ago
9 posts since Mon, 15 Nov 10
OK, I've given HeidiSQL the location of PLink.exe, but now get the error message "Plink exited unexpected". I'll get on to my host and ask whether the database will accept any of the connection types that HeidiSQL offers. It may take a day or two to get a reply from them.
Written by ansgar
4 years ago
4940 posts since Fri, 07 Apr 06
Yes, good idea.

Some hosters, especially mass hosters, do not allow external connections for security reasons. The hosting company where heidisql.com is located allows me to switch external connections on or off via Web GUI.
Written by howardnelson
4 years ago
9 posts since Mon, 15 Nov 10
I think my host will allow external connections: MySQL Front worked OK.

BTW, in posting my question to the host, I was offered a set of FAQs, one of which said that putty.exe was the standard way of gaining remote access. But I am still getting the black screen when I try to run putty, but no response to any typing, altho it seems to acknowledge that my server name is valid.
Written by ansgar
4 years ago
4940 posts since Fri, 07 Apr 06
You said you were using HTTP tunnel in MySQL Front, which means you did not use external connections. In that case the server with the phpMySQL.php did all connection stuff while that server is local from the servers point of view. Well, but as your FAQ says you should and can use putty there must be some SSH access at least. Are you sure the putty window is not waiting for you to type a password (which accepts key presses but does not display them)?
Written by howardnelson
4 years ago
9 posts since Mon, 15 Nov 10
When I type in the putty window there is no response at all: there is no prompt asking for any input on my part, and the little green square doesn't move.

I'm still waiting for an anwer from the host - I'had an acknowledgement, but nothing definitive.
Written by howardnelson
4 years ago
9 posts since Mon, 15 Nov 10
OK - my host has replied to say that I need to use TCP/IP, which is one of the options offered by HeidiSQL. But as before, entering the server name plus my usual username and password generates an error message: "SQL Error (2003): Can't connect to server (10060)"

I've asked the host to tell me what form the server name etc should be in, and whether I need to enter a start up script (if so, what it should be) - but have you any advice on how to establish a TCP/IP connection?
Written by ansgar
4 years ago
4940 posts since Fri, 07 Apr 06
If you get "Can't connect ..." the hostname and/or port is wrong. Port is mostly 3306 (as by default for a fresh MySQL installation) so concentrate on the host name which is obviously wrong in your case. I think most hosters do not give you MySQL on the domain name you ordered. Mostly this is some different, general hostname, which you can read in their FAQs or ask them by mail.

Now, when you have the right host name and still cannot get into it, you will probably get a different error, something like "Access denied", which will be good news in a way that your hostname is 100% right.
Written by howardnelson
4 years ago
9 posts since Mon, 15 Nov 10
I'm afraid we're scuppered: here is the answer from my host -

"Thanks for your response regarding this matter. Would you please advise if you are attempting to connect to the database from your web-space with us? The firewall configuration in front of our MySQL servers only allows connections on port 3306 from inside our shared hosting IP range, consequently if you are attempting to connect from an external IP it will not work. I've uploaded a test script, putting in the following information connects correctly from your web-space and all operations are successful : http://www.csj.org.uk/mysqltest.php

server : mysql02.iomart.com
database: nnnnnnn
username: nnnnnnn
password : nnnnnn"

I read this to mean that the only way in from an external IP is via a PHP tunnel, the one thing that Heidi doesn't allow. A pity: I should have liked to use it, and I appreciate all the trouble you have taken. Many thanks!
Written by ansgar
4 years ago
4940 posts since Fri, 07 Apr 06
Well you still probably have a chance to use SSH tunneling - if you can connect via putty, and if the SSH host is able to connect to the MySQL server which is quite likely.
Written by howardnelson
4 years ago
9 posts since Mon, 15 Nov 10
Thanks again - I have asked the host and they don't support SSH tunneling. All they offer is a virtual server solution, at extra cost ... Too bad. Thanks again for all your efforts to help me.
 

Please login to leave a reply, or register at first.