Access denied for user XYZ

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
mysqluser
Posts: 27
Joined: Fri 17 Nov 2006 11:48

Access denied for user XYZ

Post by mysqluser » Wed 06 Dec 2006 04:34

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

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Wed 06 Dec 2006 16:43

Please make sure that your client library supports SSL. Also check version of SSL libraries, we tested MyDAC with openssl 0.9.7c.

mysqluser
Posts: 27
Joined: Fri 17 Nov 2006 11:48

Post by mysqluser » Wed 06 Dec 2006 17:12

can you please send me the mysql dll file and the ssl dll files to my email in my profile?

mysqluser
Posts: 27
Joined: Fri 17 Nov 2006 11:48

Post by mysqluser » Wed 06 Dec 2006 21:00

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?

mysqluser
Posts: 27
Joined: Fri 17 Nov 2006 11:48

Post by mysqluser » Wed 06 Dec 2006 21:30

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.

mysqluser
Posts: 27
Joined: Fri 17 Nov 2006 11:48

Post by mysqluser » Wed 06 Dec 2006 21:45

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:

mysqluser
Posts: 27
Joined: Fri 17 Nov 2006 11:48

Post by mysqluser » Wed 06 Dec 2006 22:09

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

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Thu 07 Dec 2006 08:22

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.

mysqluser
Posts: 27
Joined: Fri 17 Nov 2006 11:48

Post by mysqluser » Thu 07 Dec 2006 09:01

hello, both is set. any idea?

mysqluser
Posts: 27
Joined: Fri 17 Nov 2006 11:48

Post by mysqluser » Fri 08 Dec 2006 01:11

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)

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 08 Dec 2006 10:51

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.

mysqluser
Posts: 27
Joined: Fri 17 Nov 2006 11:48

Post by mysqluser » Fri 08 Dec 2006 17:03

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?

mysqluser
Posts: 27
Joined: Fri 17 Nov 2006 11:48

Post by mysqluser » Sun 10 Dec 2006 22:16

not possible? :oops:

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Mon 11 Dec 2006 13:22

> 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.

mysqluser
Posts: 27
Joined: Fri 17 Nov 2006 11:48

Post by mysqluser » Mon 11 Dec 2006 14:12

great, thank you alot for all your help and time spending for my dump questions 8) :D

Post Reply