eldoDB cannot connect to MySQL server?

Back in june I had a problem with MySQL, described in this thread, which I managed to solve, thanks to all your help. However, I’ve installed MySQL on a different computer now, installed mAirlist on that computer as well, so I had to start from scratch. This time, unfortunately, it didn’t work.

I managed to start the MySQL server with the --old-passwords tag, but I can’t seem to reset the password for the user to OLD_PASSWORD. Depending on the syntax I try (I thought I may have remembered the order wrong, so I tried something else) I either keep getting error messages or it tells me that the syntax=ok, but that 0 rows are affected. And it’s right: the password is still not recognised by mAirlist/EldoDB.

Could somebody give me the correct syntax to setup a user with an OLD_PASSWORD password?

Thanks.

It’s in the official MySQL documentation: http://dev.mysql.com/doc/refman/5.0/en/old-client.html

Yeah, I know that. Although I looked in the manual for 5.1, it appears to be the same information and that’s what I’ve been trying to do for several days now, but it doesn’t work. I have absolutely no idea why. And obviously, when I start mAirlist I get an error message saying that access to the MySQL database for the user I created has been denied.

This would mean that the authentication is ok, but the user is not allowed to access the database, at least not from that remote PC. Have you tried to explicitly grant the rights to the user? Assuming that the user already exists (with the “OLD PASSWORD” style password set), you would write:

GRANT ALL ON databasename.* TO 'username'@'ipaddress';

(Replace database name, user name and ip address as needed. You can use ‘%’ as a wild card in the ip address to grant access from any computer in your network.)

[quote=“Torben, post:24, topic:5208”]This would mean that the authentication is ok, but the user is not allowed to access the database, at least not from that remote PC. Have you tried to explicitly grant the rights to the user? Assuming that the user already exists (with the “OLD PASSWORD” style password set), you would write:

GRANT ALL ON databasename.* TO 'username'@'ipaddress';

(Replace database name, user name and ip address as needed. You can use ‘%’ as a wild card in the ip address to grant access from any computer in your network.)[/quote]

I think that is the key, really. I’m not trying to connect to a database over the network, but locally. So the database and mAirlist are on the same computer (being a different one than the one from June). I think that the whole problem lies in the fact that I start the server with the --old-password tag, but that I can’t get the user password to set to OLD_PASSWORD, following the syntax in the manual.

Hmmm… I’ve just tried the GRANT syntax you quoted and that gives an interesting error message:

ERROR 1133 (42000): Can't find any matching row in the user table

Yet if I look in the MySQL administrator I can see the user in the user list. ???

[quote=“RojanUK, post:25, topic:5208”][quote=“Torben, post:24, topic:5208”] GRANT ALL ON databasename.* TO 'username'@'ipaddress';

(Replace database name, user name and ip address as needed. You can use ‘%’ as a wild card in the ip address to grant access from any computer in your network.)[/quote]

Hmmm… I’ve just tried the GRANT syntax you quoted and that gives an interesting error message:

ERROR 1133 (42000): Can't find any matching row in the user table

Yet if I look in the MySQL administrator I can see the user in the user list. ???[/quote]

I’ve just done exactly the same GRANT ALL syntax you quoted, but now I don’t get the error message anymore (which is a bit odd to say the least) and now it says:

Query OK, 0 rows affected (0.00 sec)

FLUSH PRIVILEGES is a good thing to do afterwards.

That gives the same result as above. Query OK, 0 rows affected :frowning:

Just a little update. After I rebooted the computer suddenly it worked. I have no idea why, because every time I’ve tried to set the password to OLD_PASSWORD it told me ‘0 rows affected’, but it worked anyway.

“0 rows affected” is not an error message. It just means that the command did not modify any of your data tables.

The OLD_PASSWORD command mentioned in the documentation is only required once when you initially create the user.

MySQL stores all privileges in a set of tables in the internal database named “mysql”. They are re-read when you start the server, or when you issue the FLUSH PRIVILEGES command, which should always be done after having GRANTed or REVOKEd any privileges.

By the way, the database coponents build into mAirList (“zeosdbo”) should be able to handle a more recent libmysql.dll. Starting from version 4.1 you will not need to use the OLD_PASSWORD hack anymore. However, there’s a licensing issue - as mAirList is closed-source, I’m not allowed to link against any GPL’ed code from MySQL. It is unclear whether this also applies when you dynamically link the code using the DLL file, as mAirList does.

If you want to be sure that you don’t violate MySQL’s license, you either have to buy a commercial server license from MySQL, or you have to use the old v3.23 DLL which still comes with an LGPL license, allowing it to be used in closed-source software.