Access denied for user ''@'localhost' trying to setup Moodle Mobile on Android

Access denied for user ''@'localhost' trying to setup Moodle Mobile on Android

by JP Caudill -
Number of replies: 3

Hello,

I've been trying to establish a connection to a Moodle instance from the Moodle Mobile App for Android. I kept getting the message 'We're having trouble connecting to" the instance so I enabled debugging and here is what I'm seeing in the log:


[Thu Oct 27 09:07:54.719123 2016] [:error] [pid 10015] [client :48936] PHP Warning:  mysql_connect(): Access denied for user ''@'localhost' (using password: NO) in /home/auuniv/domains/moodle.atlanticuniv.edu/public_html/lib/adodb/drivers/adodb-mysql.inc.php on line 443

[Thu Oct 27 09:07:54.721601 2016] [:error] [pid 10015] [client :48936] PHP Warning:  mysql_query() expects parameter 2 to be resource, boolean given in /home/auuniv/domains/moodle.atlanticuniv.edu/public_html/lib/adodb/drivers/adodb-mysql.inc.php on line 585

[Thu Oct 27 09:07:54.724300 2016] [:error] [pid 10015] [client :48936] Default exception handler: The username was not found in the database Debug: \nError code: usernamenotfound\n* line 180 of /login/token.php: moodle_exception thrown\n


I am puzzled why it's trying to make an anonymous connection to the database server. Am I missing something obvious?

Average of ratings: -
In reply to JP Caudill

Re: Access denied for user ''@'localhost' trying to setup Moodle Mobile on Android

by JP Caudill -

Same thing also happens from the iPhone so it's not device specific and only on devices newly installed. Users who already had the app installed work fine.

In reply to JP Caudill

Re: Access denied for user ''@'localhost' trying to setup Moodle Mobile on Android

by Berta Maroto -

Hi,

Please check the FAQ to make sure you didn't miss anything: Moodle Mobile FAQ

Specially this part: "Check that the ADOdb debug option is disabled if you are using the external database auth or enrolment plugin. (In Plugins > Authentication > External database and in Plugins > Enrolment > External database)"


Cheers,

Berta

In reply to Berta Maroto

Re: Access denied for user ''@'localhost' trying to setup Moodle Mobile on Android

by JP Caudill -
Thank you, problem solved! I missed that on the FAQ.