List:MySQL++« Previous MessageNext Message »
From:Matt Dargavel Date:April 3 2006 8:52am
Subject:Re: Access denied
View as plain text  
    The hostname, username and password are specified within your 
program when calling the Connection::connect() function (look at the 
connect_to_db() function in util.cpp). 

    In the case of the example(s), it appears these arguments are 
supplied at the command line in the form './simple1 [host] [user] 
[password]', if you've setup a password in mysql then you need to 
specify one when calling simple1. 

    If you're still having problems, you could try testing the setup out 
with the mysql client: 'mysql -hlocalhost -uroot -p' and entering your 


J S wrote:
> Hi:
> I have setup mysql++ fine, setup the test db and everything seems to
> be working. However, when I run ./simple1, I get the following error:
> Database connection failed: Access denied for user 'root'@'localhost'
> (using password: NO)
> Even though I have set a password for the root user. I guess I am
> wondering if and where you set the host, user, and password in any of
> the mysql++ configure files. I am new to C++ and definately new to
> mysql++. I appreciate any help with this matter.


*Matthew Dargavel*
Software Engineer
Shout Telecoms Ltd <>

Tel:  +44 (0) 1243 573111
Fax: +44 (0) 1243 573777

This message is intended only for the use of the person(s) ("the 
intended recipient(s)") to whom it is addressed. It may contain 
information which is privileged and confidential within the meaning of 
applicable law. If you are not the intended recipient, please contact 
the sender as soon as possible. The views expressed in this 
communication may not necessarily be the views held by Shout Telecoms Ltd.

Access deniedJ S1 Apr
  • Re: Access deniedMatt Dargavel3 Apr
  • Re: Access deniedWarren Young5 Apr