sounds like a MySQL conf, permissions in MySQL are often specified to allow access to a specific user only from the local system. You would have to take off the local restriction (or allow access from the specific remote system to be more secure, I think you can do that in MySQL iirc
Philippe Lindheimer - FreePBX Project Lead
http//freepbx.org - IRC #freepbx
That’s right…so your MySql comment might look like:
GRANT ALL PRIVILEGES asterisk.* TO asterisk@'192.168.1.120';
OR you could allow any internal network client in like this:
GRANT ALL PRIVILEGES asterisk.* TO asterisk@'192.168.1.0/255.255.255.0';
Which would allow any client on your internal network to access the DB. But the best option from a security standpoint is definitely to define the network address of the client that you want to allow in. Actually the best option for security is to only allow the server access
Is the "GRANT’ command an sql command, and if so how do I implement it? I tried finding it on the command line of linux using “find” and “locate” and it doesn’t show up any where in the Linux folders.
If it iis done as a Query, how do I do that in Linux.
It is a MySQL command. To connect to the mysql server type
> mysql -uroot -p
Enter password:
You could alternatively log in as your asterisk user as it should already have GRANT permissions on the asterisk DB for the local machine. Once logged in you will see a “mysql>” prompt where you can enter the above commands.
You really should know your MySQL root password…if it’s still at defaults (ie: blank) than try issuing this command to change the root password and try the above command again (obviously, change ‘new-password’ to something more secure):
mysqladmin -u root password 'new-password'
…if that doesn’t work, give the asteriskuser a shot:
> mysql -uasteriskuser -p
Enter Password:
Although I’m not entirely certain that this account will have the GRANT permissions on the DB…it’s definitely worth a shot.
Thank you again for your input. I can not get into MySQL even though I don’t know why. I re-edited the files to change the password again and everything is working ok with regard to accessing the mysql now.
Now trying to issue the command from above, I get the following error:
GRANT ALL PRIVILEGES asterisk.* TO asterisk@‘192.168.1.120’;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'asterisk.* to asterisk@‘192.168.1.120’ ’ at line 1
Ignore the above. I changed the syntax and added “ON” after “Privileges” and error went away.
I now get a different error!
To get into MYSQL successfully , my login was
mysql -uasteriskuser -p
I am obviously using “asteriskuser” and not root. The Trixbox directions suggest that asteriskuser is the default database user. Can I still use root. I have tried every password (even a blank one) and can’t get in using root. I am suspecting that root has more rights.
My new error when issuing the following command:
GRANT ALL PRIVILEGES ON asterisk.* TO asterisk@‘192.168.1.120’;
ERROR 1044 (42000): Access denied for user ‘asteriskuser’@‘localhost’ to database ‘asterisk’
I assume “asteriskuser” has all of the rights that it needs.
Unfortunately I don’t have any experience with Trixbox, if the directions say to use asteriskuser than I would have to assume that is the privileged user. Perhaps someone with more experience in Trixbox could lend a hand?