The MySQL module could give an access denied error message
Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=1562
Reported by Mattias Wingstedt, Idonex AB wing@roxen.com
If the process user doesn't have permission to access a MySQL database and no username or password is sent to the MySQL module you get a "Couldn't select database" error instead of an "Access denied" error.
Pike v7.0 release 312 running Hilfe v2.0 (Incremental Pike Frontend)
> Sql.sql( "mysql://localhost/roxen" );
Mysql.mysql(): Couldn't select database "roxen"
lib/modules/Sql.pmod/mysql.pike:
create("Mysql.mysql(): Couldn't select database
\"roxen\"\n",({({"/web/pik
e/7.0.312/lib/master.pike",1107,/master._main,,,1}),({0,0,Hilfe.StdinHilfe
}),({"/web/pike/7.0.312/lib/modules/Tools.pmod/Hilfe.pmod",667,,,0}),,,7})
)
lib/modules/Sql.pmod/sql.pike:215: create("localhost","roxen",0,0)
-:1: ___Foo4711()
> quit
Exiting.
Pike v7.0 release 312 running Hilfe v2.0 (Incremental Pike Frontend)
> Sql.sql( "mysql://foo:bar@localhost/roxen" );
Mysql.mysql(): Couldn't reconnect to SQL-server
Access denied for user: 'foo@localhost' (Using password: YES)
lib/modules/Sql.pmod/mysql.pike:
create("Mysql.mysql(): Couldn't reconnect to SQL-server\nAccess denied
for
user: 'foo@localhost' (Using
p"+[15],({({"/web/pike/7.0.312/lib/master.pi
ke",1107,/master._main,({"bin/pike"}),,,0}),({0,0,Hilfe.StdinHilfe}),,,8})
)
lib/modules/Sql.pmod/sql.pike:211: create("localhost","roxen","foo","bar")
-:1: ___Foo4711()
bash-2.03$ mysql mysql ERROR 1044: Access denied for user: '@localhost' to database 'mysql'