(gdb) break ArgusLog
Breakpoint 1 at 0x44deb1: file ./argus_util.c, line 20377.
(gdb) run -D 3 -t -15s -r mysql://sucker:64128256512 <at> localhost/argusdb/tbl_argus
Starting program: /usr/local/stow/argusc-3.0.7.1-update/bin/rasql -D 3 -t -15s -r mysql://sucker:64128256512 <at> localhost/argusdb/tbl_argus
[Thread debugging using libthread_db enabled]
rasql[10889.2097fef7ff7f0000]: 22:23:30.891427 ArgusParseTime (0x7ffff7ea5010, 0x7ffff7ea5130, 0x7ffff7ea5168, "-15s", ' ', 0.000000) retn sec(1339689196)
rasql[10889.2097fef7ff7f0000]: 22:23:30.891518 ArgusParseTime (0x7ffff7ea5010, 0x7ffff7ea5168, 0x7ffff7ea5130, "15s", '+', 0.000000) retn sec(1339689211)
rasql[10889.2097fef7ff7f0000]: 22:23:30.891547 ArgusCheckTimeFormat (0x7ffff7ea51a0, -15s) 1339689196.000000-1339689211.000000
rasql[10889.2097fef7ff7f0000]: 22:23:30.896636 ArgusInitAddrtoname (0xf7ea5010, 0x0, 0x0)
rasql[10889.2097fef7ff7f0000]: 22:23:30.896693 ArgusParseInit(0xf7ea5010, NULL)
[New Thread 0x7ffff6b35700 (LWP 10892)]
[Thread 0x7ffff6b35700 (LWP 10892) exited]
rasql[10889]: 22:23:30.907117 mysql_real_query error Access denied for user 'sucker' <at> 'localhost' to database 'argusdb'
rasql[10889.2097fef7ff7f0000]: 22:23:30.907243 ArgusShutDown (-1)
rasql[10889.2097fef7ff7f0000]: 22:23:30.907282 RaParseComplete(caught signal -1)
[Inferior 1 (process 10889) exited with code 01]
(gdb) where
No stack.
(gdb) print RaUser
$1 = 0x0
(gdb) print RaPass
$2 = 0x0
I don't think I should get Access Denied error because I have setup correctly for the user sucker, you can see it can access to argusdb -
mysql -u sucker -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 60
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 mysql
ERROR 1044 (42000): Access denied for user 'sucker' <at> 'localhost' to database 'mysql'
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
On Thu, Jun 14, 2012 at 11:08 PM, Carter Bullard
<carter <at> qosient.com> 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) 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.
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[9069]: 21:04:01.674994 mysql_real_query error Access denied for user 'tester' <at> 'localhost' to database 'argusdb'
rasql[9080]: 21:05:02.903700 mysql_connect error Access denied for user 'tester' <at> '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.comhttp://defcraft.net