One Database connection to other IP's

One Database connection to other IP's

rashmi kanchagar發表於
Number of replies: 1

Hello Moodlers,

I have my local moodle proejct and wanna connect to server-database which has it's own IP. I configured according to the requirement in moodle/install.php and moodle/config.php. Am using mysql5.0 - phpmyadmin and not able to connect my server DB.

Can any one helpme out in ths.. And time spent on this is being increasing.. Kindly I request any one suggest me on this situation...

Advance thanks ...

 

Regards,

Rashmi Amit Kanchagar

 

 

 

評比平均分數: -
In reply to rashmi kanchagar

Re: One Database connection to other IP's

Howard Miller發表於
Core developers的相片 Documentation writers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片
You mean that you the database server is on a different server to the Moodle web server? Put the IP address in $CFG->dbhost in config.php (definitely not 'localhost').

When you create the username and password you will have to be careful with the GRANT command. It needs to reflect the IP or name of the Moodle server. E.g.

GRANT ...... on moodle.* to moodleuser@192.168.1.99 .....

You also need to have networking enabled in MySQL - if it is already accessed from other machines then you won't have to worry about that. It's usually that GRANT command that's the problem with MySQL and there are some settings in my.cnf that can trip you up.

More info: http://dev.mysql.com/doc/refman/5.0/en/access-denied.html