NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Need help connecting to MySQL


Joined: 21 Aug 2006
Posts: 2
Location: SA
Reply with quote
Hi

Sorry guys I am very very new to all of this!

I recently purchased NuSphere and am trying to connect to my mysql databases but I do not know where to put my database files so that NuSphere can connect to them.

Secondly, when I attempt to connect to a mysql database that is already in my program files directory I get an error message saying: client does not support protocol requested by server, consider upgrading mysql client. (You need new libMySQL.dll).

But I already have MySql 5.0 installed on my system.

Could you please tell me where I can find the new libMySQL.dll file and what I must do with it? or what I am doing wrong!

Many thanks

Alan
View user's profileFind all posts by alan_martinSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7857
Reply with quote
First of all, I can hardly imagine if you could purchase NuSphere Smile, at least without letting me know Smile
Well, probably you're talking about PhpED IDE (it's much cheaper than the first thing..., you know) Smile

There are two clients you might want to have connection to your MySQL v5.
First is the IDE.
By deafault it can't connect to mysql v4.1 or higher as it uses different authentication protocol than supported by libmysql.dll that comes with PhpED. Due to licensing problems we can not ship any newer dlls but you can download a newer or copy them from an existing installation of mysql. Target file to be renewed is c:\program files\nusphere\phped\libmysql.dll

2nd is PHP script(s) that you develop.
Unfortunately, Php 4.4.3 that comes with PhpED 4.6 has _embedded_ libmysql and can not be updated. In other words, it will not work with mysql 4.1 or higher (still the same authentication protocol). As a workaround you can work with PHP5 (5.1.4). It supports mysql 4.1 and 5.0.

Quote:
where to put my database files so that NuSphere can connect to them.

PhpED or PHP connect to the database using TCP/IP protocol. Strictly speaking it is up to libmysql.dll to do so, so it does. You only specify host name, which is localhost in your case. Location of the physical files is up to the server and nothing else care of them.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Thank you


Joined: 21 Aug 2006
Posts: 2
Location: SA
Reply with quote
Ok, thanks I'll try that.
View user's profileFind all posts by alan_martinSend private message
a solution that worked for me (mysql libmySQL.dll required)


Joined: 28 Jun 2006
Posts: 92
Reply with quote
Alan-
Have you figured it out yet?
MySQL Administrator and Query Browsers connect just fine, and their libmysql.dll works! With default installations, simply copy from:
C:\Program Files\MySQL\MySQL Administrator 1.0\libmySQL.dll
over
C:\Program Files\nusphere\phped\libmySQL.dll

cheers
View user's profileFind all posts by bcswebstudioSend private message


Joined: 18 Aug 2006
Posts: 10
Reply with quote
i just ran into the same issue, i copied the mysqllib.dll file from the latest mysql query browser over the one installed by phped and that fixed the problem for me.

dimitri, can you (breifly) explain why you can't ship the latest mysqllib? have you thought about downloading it during the installation process which might get round the problem? (as you wouldn't be redistrubuting it)
View user's profileFind all posts by dominiccSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7857
Reply with quote
Quote:
dimitri, can you (breifly) explain why you can't ship the latest mysqllib?

it's pure licensing problem.
they changed license between 4.0 and 4.1 and since that it can't be redistributed with non-GPL software.
License exceptions are made for php-alike software, so php still comes with libmysql.dll 4.1.7

regarding downloading during installation, this idea came into our minds, but personally I don't think it's a reliable solution.
Because of the license we can't do it from our site (otherwise it's still re-distributing), but doing it from mysql site is not that good.
First, they can (and will) change links. Second, there are no stand-alone dlls, only packaged installers, so they have to be run etc...
Better if user do it under his own full control.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 21 Jul 2007
Posts: 3
Reply with quote
dmitri wrote:

There are two clients you might want to have connection to your MySQL v5.
First is the IDE.
By deafault it can't connect to mysql v4.1 or higher as it uses different authentication protocol than supported by libmysql.dll that comes with PhpED. Due to licensing problems we can not ship any newer dlls but you can download a newer or copy them from an existing installation of mysql. Target file to be renewed is c:\program files\nusphere\phped\libmysql.dll

2nd is PHP script(s) that you develop.
Unfortunately, Php 4.4.3 that comes with PhpED 4.6 has _embedded_ libmysql and can not be updated. In other words, it will not work with mysql 4.1 or higher (still the same authentication protocol). As a workaround you can work with PHP5 (5.1.4). It supports mysql 4.1 and 5.0.

Quote:
where to put my database files so that NuSphere can connect to them.

PhpED or PHP connect to the database using TCP/IP protocol. Strictly speaking it is up to libmysql.dll to do so, so it does. You only specify host name, which is localhost in your case. Location of the physical files is up to the server and nothing else care of them.


I am having a problem in getting PhpED to connect to MySQL.
I have carried out part 1 you mentioned - by updating all the instances of libmysql.dll to the 4.1.22-community-nt version I use.
But when I run the phpinfo() function I see that mysql is still showing as the old version:-
MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 3.23.49

If I run phpinfo() from the local webserver I see this:-
Active Persistent Links 0
Active Links 1
Client API version 4.1.22

So how can I get PhpED to use MySQL 4.1 ?

You say that MySQL is embedded in the PHP version you supply and mention a work around by using PHP5 - but I can't do that for the scripts I work with - they are PHP4 developed and it's not practical to convert to PHP5.

Surely there must be someway to use PHP4 and MySQL 4.1 with your PhpED?

Dave.
View user's profileFind all posts by BoosterSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7857
Reply with quote
Quote:
But when I run the phpinfo() function I see that mysql is still showing as the old version:-

The post you referred to is about libmysql that is used by IDE to connect to mysql server. It can and should be updated and I explained why we don't do this for you. As of PHP4 itself, no way. Official PHP4 binaries come with mysql 3.23 client builtin and therefore you can't change it. The library is in php.exe.
Either switch to PHP5 or try to find non-official php4 distro with support for mysql 4.1 and higher. We don't provide this.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Veteran

Joined: 26 Dec 2006
Posts: 253
Location: Phoenix, AZ
Reply with quote
[quote="dmitri"]
Quote:
egarding downloading during installation, this idea came into our minds, but personally I don't think it's a reliable solution.


Unless you can get the MySQL folks to offer a permanent link to the DLL, I agree. However, and I've suggested this before, instead of shipping a years-old version of the lib that produces a somewhat cryptic error message when you try to use it with most modern MySQL installations, it would be very helpful if you simply left the lib out altogether and produced a useful information message that told the user where to go to download it and how to install it.

It'd also be nice if the installer didn't overwrite the file every time a PhpED update comes along.
View user's profileFind all posts by bobwilliamsSend private messageVisit poster's website
Need help connecting to MySQL
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic