dbTalk Databases Forums  

Access denied

mailing.database.mysql-plusplus mailing.database.mysql-plusplus


Discuss Access denied in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
J S
 
Posts: n/a

Default Access denied - 03-31-2006 , 08:32 PM






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?unsu...ie.nctu.edu.tw


Reply With Quote
  #2  
Old   
Matt Dargavel
 
Posts: n/a

Default Re: Access denied - 04-03-2006 , 03:52 AM






--------------020607060507050307000001
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:
Quote:
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.


--------------020607060507050307000001--


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.