Hi,
I used to create database in mysql like this:
#mysql -u root -p
mysql> create database somedb grant all privileges on somedb.* to someusr@"localhost" identified by 'passwrd';
Now i thought mysql listening on all ports is not a very secure way so i thought of changing the listening to ip 192.168.1.175 by adding the following line to /etc/my.cnf
bind-address=192.168.1.175
And restarted the mysqld
Now it started listening on that ip.
But when i tried the following the access denied error was thrown:
mysql -u root -h 192.168.1.175 -p
but the following was still working
mysql -u root -h localhost -p
After googlling up on the cause of not allowing me to login via ip, i changed the mysql table in mysql database in user colum updated to 192.168.1.175 ip address.
And commited and restarted the mysql Now it will not allow me to login via localhost also. Now i am login as
#mysql -u root
mysql> use mysql;
ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'mysql
Alfresoc which is using mysql database is now throuing db error and it si not starting. the error i get is
16:36:05,519 WARN [org.hibernate.cfg.SettingsFactory] Could not obtain connection metadata
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure ....
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure ....
The above I found in this file /opt/Alfresco/alfresco.log
i want to know if the mess up i did in mysql is the reason for j2ee application not starting or is it something else. if it is mysql issue please let em know how to fix it.
with regards,
ashwin
I used to create database in mysql like this:
#mysql -u root -p
mysql> create database somedb grant all privileges on somedb.* to someusr@"localhost" identified by 'passwrd';
Now i thought mysql listening on all ports is not a very secure way so i thought of changing the listening to ip 192.168.1.175 by adding the following line to /etc/my.cnf
bind-address=192.168.1.175
And restarted the mysqld
Now it started listening on that ip.
But when i tried the following the access denied error was thrown:
mysql -u root -h 192.168.1.175 -p
but the following was still working
mysql -u root -h localhost -p
After googlling up on the cause of not allowing me to login via ip, i changed the mysql table in mysql database in user colum updated to 192.168.1.175 ip address.
And commited and restarted the mysql Now it will not allow me to login via localhost also. Now i am login as
#mysql -u root
mysql> use mysql;
ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'mysql
Alfresoc which is using mysql database is now throuing db error and it si not starting. the error i get is
16:36:05,519 WARN [org.hibernate.cfg.SettingsFactory] Could not obtain connection metadata
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure ....
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure ....
The above I found in this file /opt/Alfresco/alfresco.log
i want to know if the mess up i did in mysql is the reason for j2ee application not starting or is it something else. if it is mysql issue please let em know how to fix it.
with regards,
ashwin