ramysqlinsert, rasql

Carter Bullard carter at qosient.com
Thu Jun 14 13:18:24 EDT 2012


I don't understand why your code doesn't break in ArgusLog.  Please break in 
ArgusShutDown instead.

(gdb) break ArgusShutDown

When it breaks, you will need to move up in the stack a bit, maybe two
levels, to get to the mysql_real_query() call.  There will be a string that
you should print out, which will tell us what query you were making.
(gdb) up
(gdb) up
(gdb) print sbuf

Your problem is not access using the password.  Its some other
permission problem, like creating a database or a table that is
the problem, I think.  Did you look at your mysql logs ?

Carter



On Jun 14, 2012, at 11:08 AM, Carter Bullard wrote:

> Hey CS Lee,
> You are getting a query error, not a mysql_connect error, so the account
> and password are working.  The only time the user and password are
> presented to mysql from a client program is when connecting, using
> mysql_real_connect().  
> 
> Not sure what query you're doing, so you may need to get into gdb() to find
> the actual query that is causing the problems.
> 
> You may need some privileges for the account, such as table create in
> order for it to work.  So, once we realize what query you're doing, we can
> probably figure it out. 
> 
> Running with "-D 3" will generally print out all the database attachments,
> database access and queries.
> 
> % gdb rasql
> (gdb) break ArgusLog
> (gdb) run -D3 -t -15s -r mysql://tester:12345678@localhost/argusdb/argustable
> (gdb) where
> (gdb) print RaUser
> (gdb) print RaPass
> 
> Also you may have to look at your mysql ErrorLog, or AccessLog, to see what
> mysql is complaining about.
> 
> Carter 
> 
> On Jun 14, 2012, at 10:42 AM, CS Lee wrote:
> 
>> hi guys,
>> 
>> Have anyone tried to insert or query mysql data to the db with username and password using either rasql or rasqlinsert, it seems not working for me(user without password is fine though) -
>> 
>> rasql -t -15s -r mysql://tester:12345678@localhost/argusdb/argustable
>> rasql[9069]: 21:04:01.674994 mysql_real_query error Access denied for user 'tester'@'localhost' to database 'argusdb'
>> 
>> rasql -t -15s -r mysql://tester@localhost/argusdb/tbl_argus
>> rasql[9080]: 21:05:02.903700 mysql_connect error Access denied for user 'tester'@'localhost' (using password: NO)
>> 
>> I have actually configured the user tester with password 12345678, and I can login to the database using mysql client  -
>> 
>> mysql -u tester -p
>> Enter password:
>> Welcome to the MySQL monitor.  Commands end with ; or \g.
>> Your MySQL connection id is 177
>> Server version: 5.1.63-0ubuntu0.11.10.1 (Ubuntu)
>> 
>> Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
>> 
>> Oracle is a registered trademark of Oracle Corporation and/or its
>> affiliates. Other names may be trademarks of their respective
>> owners.
>> 
>> Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
>> 
>> mysql> use argusdb
>> Reading table information for completion of table and column names
>> You can turn off this feature to get a quicker startup with -A
>> 
>> Database changed
>> 
>> 
>> -- 
>> Best Regards,
>> 
>> CS Lee<geek00L[at]gmail.com>
>> 
>> http://geek00l.blogspot.com
>> http://defcraft.net
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist1.pair.net/pipermail/argus/attachments/20120614/65e04b72/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4367 bytes
Desc: not available
URL: <https://pairlist1.pair.net/pipermail/argus/attachments/20120614/65e04b72/attachment.bin>


More information about the argus mailing list