Skip to content
This repository has been archived by the owner on May 31, 2023. It is now read-only.

FreeRadius Database Query Error #25

Open
jjumpm2 opened this issue Oct 26, 2016 · 13 comments
Open

FreeRadius Database Query Error #25

jjumpm2 opened this issue Oct 26, 2016 · 13 comments

Comments

@jjumpm2
Copy link

jjumpm2 commented Oct 26, 2016

Hi,

Has anyone got the following error:

FreeRadius Database Query Error: Access denied for user 'xxxxxxx'@'localhost' to database 'radius'

xxxxxxx = the WHMCS MySQL username.

I have found a few mentions of the above error, but no solution..

Thanks

@lukehebb
Copy link

That means the database details are wrong. Which side are you seeing this on and is the script in the correct place?

@jjumpm2
Copy link
Author

jjumpm2 commented Oct 26, 2016

WHMCS side - followed the instructions and all seems to be installed correctly. Should it be the WHMCS MySQL username? Should it not be picking up what I have entered into the server set up?

@lukehebb
Copy link

That looks like the script you are using is the one that runs on the freeradius server - this should be on a web server on the freeradius server or set to connect to the freeradius server remotely (and the user have the correct permissions granted)

@jjumpm2
Copy link
Author

jjumpm2 commented Oct 26, 2016

Yes, WHMCS is set to connect to the remote server running freeradius. I have input the DB username/password that I used to set up freeradius, but it is showing the local username instead..

@lukehebb
Copy link

Let me take a look at the code, which file have you put the details in?

@jjumpm2
Copy link
Author

jjumpm2 commented Oct 26, 2016

On the WHMCS side, the login details are entered within WHMCS, not into a file directly. On the server side, it is entered into config.php

@lukehebb
Copy link

Is the server IP set correctly in the module config within WHMCS? It seems to be connecting to localhost, I'm assuming that freeradius isn't running on the same server as WHMCS?

@jjumpm2
Copy link
Author

jjumpm2 commented Oct 27, 2016

Yes, server IP is set correctly within WHMCS and yes, the server is external.

@jjumpm2
Copy link
Author

jjumpm2 commented Oct 27, 2016

Ok, figured it out now - was a permissions issue on the DB. Thanks for your help.

@kami-nashi
Copy link

So I'm running into a similar issue here, I think it might just be some confusion about some of the settings.

The error:

Module Create Failed - Service ID: 3 - Error: FreeRadius Database Query Error: No database selected

My test env:
WHMCS server @ 192.168.100.107
WHMCS DB @ 192.168.100.13
Freeradius server @ 10.68.100.71
Freeradius DB @ 10.68.100.80

Now, when I manually exec the cron.php file on the freeradius side, it picks up names that are in the RADCHECK table that aren't in WHMCS, so that tells me that its reading the DB correctly but I'm not sure where WHMCS knows about this.

On the WHMCS side, on the servers page, I have an entry pointing to the freeradius server ip, but I think thats inaccurate, since the module appears to be throwing SQL, which tells me that I should be using the freeradius db IP and credentials, yet I still get a fail for that as well.

Where are my wires crossed?

@kami-nashi
Copy link

Actually, I found it. I didn't realize that the 'server hash' was where the database name needed to be placed, which with the radius db host info following, I have a successful insertion when an order is accepted. Freak'n awesome.

@shahmeer
Copy link

@kami-nashi where did you find the HASH ENTRY. I am facing the same issue. where can i find the hash entry to put in to the server config from whmcs side to connect to the radius server to run the create account module. Please mention that.

@eksoverzero
Copy link
Owner

@shahmeer, it's under the server configuration settings

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants