Jump to content

Recommended Posts

Posted

Hi Guys,

 

I have 2 server (Ubuntu 8.10) one setup as a web server and the other as a mysql server I want to allow the web server (moodle) to connect to the dbserver but I am getting access denied issues.

 

Does anyone know what I need to do to allow remote db access from the web server?

 

From what I can see on the Ubuntu forums there are no firewall restrictions and this would seem to be correct cos if i do:

 

mysql -h 192.168.0.17 -u moodleuser -p

 

I get asked for the password and upon entering this i get:

 

ERROR 1044 (42000): Access denied for user 'moodleuser'@'%' to database 'moodle'

 

Any ideas?

Posted

If there's no firewall in place, it would suggest that the moodle user added to the database server is allowed from local only. Take a look at the SQL Grant statement (can't remember the syntax, sorry), and ensure that you grant privileges for the moodle user at another IP (I think you can specify only the IP of the connecting machine, ie the webserver, if not, specify from all then lock down with firewall to only allow MySQL connections from the webserver IP).

 

I tend to use phpmyadmin for a lot of my DB admin, means that I don't have to remember syntax... hence why I don't remember the GRANT statement!

  • Thanks 1
Posted
The user has full control of that DB on the mysql server and is allowed to connect from any host (%) so in thoery it should work :confused:
Posted
Look for the bind-address option in /etc/mysql/my.cnf - it's around line 69 in my file. It is probably set to 127.0.0.1 - change it to the LAN IP address of the server.
  • Thanks 1
Posted

Ok redid the GRANT privilages and rebooted the server "a couple of times" and all seems to be working :rolleyes:

 

Thanks guys for the pointers.

Posted
Glad you got it sorted. I was just about to check that the keyboard keys weren't moving and making you type the incorrect password as that was the only other solution I could see! :p
  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...