Connecting to the MySQL Database using ODBC

Connecting to the MySQL Database using ODBC

by Mark Little -
Number of replies: 1

Moodle is working fine.

What I want to do is connect to the database from another machine. I have installed MySQL Control Center and the ODBC Drivers onto the server and the workstation.

I can connect to the database on the server by using the root@localhost password, but when I try to change the localhost to the Server name Moodle I can no longer connect to the database.

I have even tried creating a new user called admin@moodle with a password and this will also not connect either from the workstation or the server.

Am I missing something here? is there a configuration file I have to modify which tells the server that Moodle is the same as Localhost.

Any ideas?

I have EasyPHP installed and using Apache with Moodle 1.4.1 installed

Average of ratings: -
In reply to Mark Little

Re: Connecting to the MySQL Database using ODBC

by Charles Libby -
You might try adding an entry in to your hosts file. This applies to windows or linux/UNIX systems.

Just add an entry  with your IP replacing the 555.555.555.555 in the following lines

555.555.555.555            moodle

If you have an entry with localhost, then just add an entry like the following

555.555.555.555             localhost moodle

In windows, the file is in the

C:\WINDOWS\system32\drivers\etc directory, where WINDOWS is your operating system directory (another option might be WINNT)

Charles