|
Home > Archive > MySQL PlusPlus > April 2006 > Access denied
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
|
| 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.
--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?uns...sie.nctu.edu.tw
| |
| Matt Dargavel 2006-04-03, 7:33 am |
| -------------- 02060706050705030700
0001
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
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
password.
Matt.
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
shout-telecoms.com <http://www.shout-telecoms.com>
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.
-------------- 02060706050705030700
0001--
|
|
|
|
|