Remote ODBC connection to MOODLE MySQL DB

Remote ODBC connection to MOODLE MySQL DB

by Amir Elion -
Number of replies: 2

We are trying to develop an internal application that will look up some data in moodle DB tables.

For that purpose, we are trying to connect from ODBC to MOODLE MySQL DB. The MOODLE is installed on a Linux redhat server.

I have installed MySQL ODBC 3.51 Driver on my machine.
I did all necessary setup as mention in: http://docs.moodle.org/en/ODBC but I’m still getting connection error - [MySQL][ODBC 3.51 Driver]Host '111.11.11.11' is not allowed to connect to this MySQL server.

Do we have to do some changes in other configuration files? Or some different setup?

Average of ratings: -
In reply to Amir Elion

Re: Remote ODBC connection to MOODLE MySQL DB

by Michael Aherne -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
It sounds like you need to allow your local machine to log in to MySQL on the server. To do this, you'd run a query like this on the MySQL server:

GRANT SELECT ON moodle.* TO '[username]'@'111.11.11.11' identified by '[some password]'

The MySQL documentation for this has more information.

Hope this helps!
In reply to Michael Aherne

תשובה ל: Re: Remote ODBC connection to MOODLE MySQL DB

by Assaf Ram -

Is it needed System Admin to create these  grants ?