Page 1 of 1

Access denied for user XYZ

Posted: Wed 06 Dec 2006 04:34
by mysqluser
hello

after hours of searching and trying to solve the "Access denied for user XYZ" problem, i am at the end :shock:

i get everytime when i try to connect the error "Access denied for user XYZ"

i have read some threads here and can say the following:

1) i have direct=false (had it on true but then i get the funny D: drive error)
2) yes, SSL works fine, i tried it with Navicat MySQL and the connectin with SSL works great.
3) no, i dont need to set privileges for the user, they are all correct (see point 2)
4) i'm using the mysql DLL (1.13mb) from 4.x. the DLL (1.44mb) from 5.x gets a SSL connection error.
5) i'm using the libeay32.dll and ssleay32.dll direct from openssl.org but what i'm wondering is, that the application is start able without the dlls in directory (and i dont have anywhere like system dir other ones) i think its normally that there must be an error? strange.... maybe that is the problem, that mydac doesn't ask for this two files?

i tried all options from A to B over G and i don't get it working. i hope that you can help me because i like to order MyDAC soon :D

Posted: Wed 06 Dec 2006 16:43
by Antaeus
Please make sure that your client library supports SSL. Also check version of SSL libraries, we tested MyDAC with openssl 0.9.7c.

Posted: Wed 06 Dec 2006 17:12
by mysqluser
can you please send me the mysql dll file and the ssl dll files to my email in my profile?

Posted: Wed 06 Dec 2006 21:00
by mysqluser
but anyway i can't belive that it will work then, i tried mostly mysql client dll files and mostly openssl dll files and on all the same problem. any idea?

Posted: Wed 06 Dec 2006 21:30
by mysqluser
okay got working now. i have deleted now the openssl files in system32 folder and installed Win32OpenSSL-0_9_7L and set the direct option back to true. now it works perfect. i will buy soon mydac 8)

for all ppl which have the problem with access denied:

use MyDAC 4.0.21
use the dll files from Win32OpenSSL-0_9_7L
set Direct to true

should work for all.

Posted: Wed 06 Dec 2006 21:45
by mysqluser
strange mydac still can make a login after i changed the key.pem data!!! :shock: :shock: how?? i changed the key.pem data a bit and mydac still can login to mysql :shock:

Posted: Wed 06 Dec 2006 22:09
by mysqluser
i have still a next question: how can i tell mydac that they look for libeay32.dll and ssleay32.dll in the executable directory instead of SYSTEM32 path? because maybe has any user an application with this dlls already in system dir which are not compatible with mydac

Posted: Thu 07 Dec 2006 08:22
by Antaeus
Probably you have not mentioned REQUIRE SSL option setting user's account. This is described in this topic of MySQL Reference Manual.
Also check if value of the Protocol option of TMyConnection object is set to mpSSL.

Posted: Thu 07 Dec 2006 09:01
by mysqluser
hello, both is set. any idea?

Posted: Fri 08 Dec 2006 01:11
by mysqluser
and is it possible to set on option in new mydac version to set the library path for libeay32.dll and ssleay32.dll that mydac looks for it there, instead of system path first? this would be great because see above posting. 8)

Posted: Fri 08 Dec 2006 10:51
by Antaeus
MyDAC loads these libraries by the LoadLibrary function. So, you can place the libraries in a folder accessible for this function. You can read more about LoadLibrary in MSDN.

Posted: Fri 08 Dec 2006 17:03
by mysqluser
oh my god. you are right about the SSL. SSL is for the user in use but as i can see now, i think the mysql server doesn't need to client certificate files for authentification or so. could this be like that? how do i set mysql that they needs to authenticate the user by client cert files? i testet it now again with navicat, set "SSL use" and unset "authenticaton use" (means, no SSL cert files) and what i see? it works like by mydac. sorry for my misstake i thougth its a mydac problem.

okay, but i don't know what you mean with LoadLibrary, because this function anyway needs as parameter the path to the librarys. So, how do i set an folder for it, that mydac looks there, instead of a system folder?

Posted: Sun 10 Dec 2006 22:16
by mysqluser
not possible? :oops:

Posted: Mon 11 Dec 2006 13:22
by Antaeus
> how do i set mysql that they needs to authenticate the user by client cert files?
Please see this topic of MySQL Reference Manual for details.

> okay, but i don't know what you mean with LoadLibrary,
LoadLibrary is called by MyDAC with no path specified. You can find description of LoadLibrary here. We advice you to place SSL libraries into the directory with your executable file.

The next version of MyDAC will have support of SSH protocol via Core Lab CryptoLibrary component set, so no additional files will be required to work with encrypted connection. The beta version of MyDAC 5 will be released in a month.

Posted: Mon 11 Dec 2006 14:12
by mysqluser
great, thank you alot for all your help and time spending for my dump questions 8) :D