I’m trying to log data to a MySQL database running at localhost (same machine as weather display).
My problem is that I cannot get WDMYSQL to connect to the database. Errormessage:
[i]ERROR: [1045] #28000Access denied for user ‘weather’@‘localhost’ (using password: YES): Could not connect to mysql server using:
User: weather
Host:localhost
Port:3306
DB:weather
Please check the following:
MySQL Server is running on the host and port specified and that you can access it through possible firewalls
If the server is available and on a remote machine, check that this username (with password) may access it from a remote IP, see MySQL Manual (Security)
Client:4.1.14
Server:5.0.51a-community-nt at time/date 23:50:53 02.04.2008[/i]
I run weather display v 10.37i build 20 (updated today, via “full install” package from download section).
MySQL 5.0.51a
I changed the security setting to “Use old passwords” before creating user “weather” in MySQL.
I’m able to use the MySQL server in other programs to run SQL queries etc. The “weather” user have all privileges.
Just try a new user created without old passwords turned on. I’m sure something was done about this a while ago. Just recently I had to reinstall and I dont have that flag turned on in my MySQL and its working. Might be wrong but its worth a try.
Make absolutely sure you have granted permissions to weather@localhost. MySQL is very specific about accounts and where they come from. For example [email protected] is a different account to weather@localhost.
purely as a test (as this may break your security) try
GRANT ALL ON wxdata.* TO weather@‘%’ IDENTIFIED BY ‘password’;
This will grant full permissions to wxdata from any host.
Also don’t forget to run SET PASSWORD FOR weather@‘%’ = OLD_PASSWORD(‘password’);
I just don’t get it. I checked and rechecked the privileges for the “weather” user - even tried to create a new user and new db, with and without the “old password” option.
Probably something obvious I’m doing wrong, any more ideas? Thanks for all the help!
The firewall is OFF. The weather@% user has all privileges as well.
Stuart (Broadstairs) makes a very good point, mysql.exe is a good solid low-level client. I do all my MySQL stuff using this client.
I’ve personally never used the Windows version and also never used a MySQLD GUI. I avoid GUI’s like the plague, too much of a hardened UNIX person you see 8O Hence the command stings i gave in my last post :?
Again i’m not sure about the windows version but with the *nix version you have to start the daemon with --old-passwords as well as creating the account with the OLD_PASSWORD(‘password’) parameter.
I’m quite sure that it’ll be the same for windows, do you have “old-passwords” in your my.cnf config file under the heading [mysqld]? or staring the daemon using something like mysqld --old-passwords?
Failing that you could always try installing a version 4 MySQL daemon (service) after all i doubt there are any real benefits for a weather station setup to use version 5.
Anyway, just my thoughts. Hope you get it sorted soon.
Nikki V5 does work with WD as I use it. Also I do use gui’s but stick to the MySQL distributed ones mainly and they work OK. All you need is to set the p/w flag in the administrator gui and restart the service (on windows). Anyway lets see what happens with the commandline…
Yes i know, i use version 5 too and i also agree that there is nothing wrong with GUI’s. its just that given a choice i prefer not too, just too many years of old style UNIX and switch / router programming.
Not sure about the “p/w flag in the admin gui” so will concede to your experience on this one.
I wonder if Brian has any plans on upgrading the WD MySQL client?
I had this problem. Turned old passwords on, created user, no go. Removed the user. Had to restart the mysql service for the old password thing to seeming take effect. Then I created the user. I used a numeric only password on V5.0.
I did a fresh install of v5, set old passwords on, restarted mysql service, created user and OK. Strange thing is that I did the same thing before the fresh install, but probably something got mixed up…
Anyway, now I’m working on a python → http-post → php application to get the data to my web mysql database.
[color=red][color=blue]ERROR: [1045] #28000Access denied for user ‘robert’@‘localhost’ (using password: YES): Could not connect to mysql server using:
User: robert
Host:localhost
Port:3306
DB:weather
Please check the following:
MySQL Server is running on the host and port specified and that you can access it through possible firewalls
If the server is available and on a remote machine, check that this username (with password) may access it from a remote IP, see MySQL Manual (Security)
Client:4.1.14
Server:5.0.51a-community-nt at time/date 23:50:53 02.04.2008[/color][/color]
I have half a dozen other very complex databases running on the server - but this sucker simply will not connect any way i do it.
I’m not going to reinstall as I am already running 5.0.22, and the other db’s run fine, accessed from loacl and remote machines.
Command line MYSQL → works fine. I can connect to it no worries.
mysql -u robert -p wdmysql
Password: ******
mysql →
SO it isn’t that. However - when I go into WD, and run the program wdmyaql ( same name as my db I know) I get the error shown above.
Even if I use the ‘root’ user that has access to everything in the world … It won’t connect. nuts!
What? where? Is this in MySQL … or in WD ? This may seem like a silly question, but why does WD connecting to a database care about new or old passwords? That should be fixed surely?
and how do I fix it?
Ok, I’ve wasted hours on this now. Going in circles. I’ll just wait until WD updates the client to handle MySQL 5.xx
Tried all the gizmoes mentioned, but don’t want to have to rehash all my passwords on the other databases, and just changing the use on the WD database to OLD_PASSWORD seemed to have no effect. Neither does using a numerical password.
the mysql program used for the linux and mac versions handles the new password format OK
I could compile that for windows
are you interested in testing that?
Hi Brian,
I’d love to test it for you. Give me a link, and I’ll download it. I presume you are talking about a new wdmysql.exe. But yes, would love to give it a go. I’d kind of like to get that part going so I can use it.
on a slightly different note - can I hook up a soil temp. sensor to WD… ?
cheers
Robert
Yes please Brian, I’d be glad to test it for you. I’ve also been having “issues” and tearing my hair out with very odd MySQL behaviour similar to that described in this thread.
I’d be interested in testing this as well, not because I have problems - I don’t - but because I need to know if the old method still works with the new code before it goes live!