I am not able to connect to mysql database. The error message is shown below:
*+"A connection to the database could not be made. View the error message
by opening the “/logs/error.log” log file, then go back to fix the
problem."+*
I have attached the Database Settings- Standard Connection page. I am using CentOS 5 and mysql version is mysql-5.0.22-2.1. Mysql is running and i have created database as openfire.
It is important that you know the problem statement first. The error.log file would show you the kind of problem you’re facing. Can you see any problem in that file?
You need to INSERT a record in you ‘mysql.db’ table specifying that your openfire admin user (in your case ‘admin’) can connect to ‘openfire’ database from host ‘domain.com’. This will grant the user the necessary access privilege. Remember to reload or restart your mysql after the INSERT.
For MYSQL use mysql admin gui login to your MYSQL server goto tools
manage connection.The user name you are using connect fill in the info
and try again
and dont forget to set up your database permissions! and for user name set all permissions for the user name to information_schema and mysql and openfire databases
| xxx.xxx.xxx.xxx | openfire | admin | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y |
As far as I could tell, error “Access denied for user ‘admin’@‘domain.com’ (using password: YES)” came from the MySQL server. That means you could connect to MySQL server but the server didn’t allow access. So, it’s the problem with MySQL permission setting. Either the password was not correct or MySQL knew nothing about domain.com.
My guess is that either:
wrong password
wrong spelling/entry of host in Host field (the name that you hide above)
you didn’t restart/reload MySQL/grant tables every time you change permissions.
Also, if the error message says exactly as ‘admin’@‘domain.com’, then the Host field has to contain the exact domain.com or the correct variation of wildcards including just the % character. FYI, %.domain.com or the IP address of domain.com will not work. xxx.xxx.xxx.xxx will definitely fail.
Like others have suggested, you might want to consider using the friendly tools to administer MySQL server.
yes use mysql admin gui and heidi sql for edit database first thing to do drop the database you are working on now and start with a new one.the tools I have recommended are simple and make the job much faster