MySQL password problems

If you think that something doesn't work in Aware IM post your message here
Post Reply
tkilshaw
Posts: 170
Joined: Thu Jan 19, 2006 11:33 pm
Location: Western Canada
Contact:

MySQL password problems

Post by tkilshaw »

Following the instructions of page 6 off the Installation Guide produces problems.

Specifically

1) I installed MySQL mysql-5.0.19-win32 on Windows Server 2003 SP1 as a service. During installation I set a root password.

2) on my PC running Windows XP Pref. SP2, I installed mysql-administrator-1.1.9. I used this to test that I could access MySQL on the server using the root account and my password.

3) I set the BASServer.props values correctly.

Aware claimed that it could not log in to MySQL and that MySQL was resing the account name or password.

Eventually the only thing that worked was to remove the password from MySQL change the BASServer.props values back to their original values without any password argument at all:

DriverURL=jdbc:mysql://192.168.30.30/BASDB?user=root
DriverTestURL=jdbc:mysql://192.168.30.30/BASDBTEST?user=root
BootstrapURL=jdbc:mysql://192.168.30.30/?user=root

For now we are running MySQL without any access control.

Terry
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

Terry,

this sounds like a well known problem that has been brought up on this forum before. Aware IM did have a problem at one stage whereby it was using the obsolete version of MySQL driver that used to cause problems with password authentication.

I assume you are using the latest Aware IM version? If so, could you please check one particular file in the AwareIMRoot/Tomcat/shared/lib directory. Do you have mysql-connector-java-3.1.12-bin.jar file there (new driver) or mysql-connector-j-2.0.14-bin.jar (old driver) or both?

Thanks
Aware IM Support Team
tkilshaw
Posts: 170
Joined: Thu Jan 19, 2006 11:33 pm
Location: Western Canada
Contact:

Post by tkilshaw »

only mysql-connector-java-3.1.12-bin.jar

Terry
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

Terry,

we have downloaded the latest version of MySQL and checked everything on our end - seems OK.

I noticed you are using specific IP address to connect to MySQL, which means that you are connecting to MySQL from the remote machine. Note that MySQL accounts are sensitive to where you are connecting from. Please check that your MySQL account allows you to connect from your specifc remote machine (check GRANT command in MySQL manual).

If you are not sure please start mysql utility from the Startup menu and issue the following commands:
1) use mysql
2) select * from user;

Send us the output of the last command.

Best Regards
Aware IM Support Team
tkilshaw
Posts: 170
Joined: Thu Jan 19, 2006 11:33 pm
Location: Western Canada
Contact:

Post by tkilshaw »

Facts:

1) I can run Aware and it talks to MySQL, which is running on a separate server, as long as the MySQL root account has no password.

2) If I give MySQL root account a password and change the Aware properties file as the Aware docs tell me to, MySQL rejects Aware at authentication time.

3) I can run MySQL Administrator program on my computer and it can access MySQL both with and without a root password.

You wrote:
---
If you are not sure please start mysql utility from the Startup menu and issue the following commands:
1) use mysql
2) select * from user;
---
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1342 to server version: 5.0.19-nt

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use mysql
Database changed
mysql> select * from user;
+-----------+------+----------+-------------+-------------+-------------+-------
------+-------------+-----------+-------------+---------------+--------------+--
---------+------------+-----------------+------------+------------+-------------
-+------------+-----------------------+------------------+--------------+-------
----------+------------------+------------------+----------------+--------------
-------+--------------------+------------------+----------+------------+--------
-----+--------------+---------------+-------------+-----------------+-----------
-----------+
| Host | User | Password | Select_priv | Insert_priv | Update_priv | Delete
_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | F
ile_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Show_db_priv
| Super_priv | Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl_s
lave_priv | Repl_client_priv | Create_view_priv | Show_view_priv | Create_routin
e_priv | Alter_routine_priv | Create_user_priv | ssl_type | ssl_cipher | x509_is
suer | x509_subject | max_questions | max_updates | max_connections | max_user_c
onnections |
+-----------+------+----------+-------------+-------------+-------------+-------
------+-------------+-----------+-------------+---------------+--------------+--
---------+------------+-----------------+------------+------------+-------------
-+------------+-----------------------+------------------+--------------+-------
----------+------------------+------------------+----------------+--------------
-------+--------------------+------------------+----------+------------+--------
-----+--------------+---------------+-------------+-----------------+-----------
-----------+
| localhost | root | | Y | Y | Y | Y
| Y | Y | Y | Y | Y | Y
| Y | Y | Y | Y | Y
| Y | Y | Y | Y | Y
| Y | Y | Y | Y
| Y | Y | | |
| | 0 | 0 | 0 | 0
|
| % | root | | Y | Y | Y | Y
| Y | Y | Y | Y | Y | Y
| Y | Y | Y | Y | Y
| Y | Y | Y | Y | Y
| Y | N | N | N
| N | N | | |
| | 0 | 0 | 0 | 0
|
+-----------+------+----------+-------------+-------------+-------------+-------
------+-------------+-----------+-------------+---------------+--------------+--
---------+------------+-----------------+------------+------------+-------------
-+------------+-----------------------+------------------+--------------+-------
----------+------------------+------------------+----------------+--------------
-------+--------------------+------------------+----------+------------+--------
-----+--------------+---------------+-------------+-----------------+-----------
-----------+
2 rows in set (0.00 sec)

mysql>

thanks,

Terry
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

Terry,

according to the output you sent us you have two users defined:
1) One has user name "root", no password and can only allow access from localhost (note "localhost", "root" and blank password in the first line)
2) The second user also has the name "root", no password and allows access from any computer (note "%" symbol in the second line) This is why you can run MySQL from any computer.

You have no users defined with non-blank password. To define a user with a non-blank password accessible from any remote machine, open mysql utility and issue the following commands:
a) use mysql
b) GRANT GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' IDENTIFIED BY 'some_pass' WITH GRANT OPTION;

where username and some_pass are user name and password. Then modify BASServer.props file to include this user name and password.

Let us know if you still have problems after that.

Best Regards
Aware IM Support Team
Post Reply