Filipe Silva Wrote:
-------------------------------------------------------
> Have you checked if you are able to connect with
> the user 'macamba' using the MySQL client?
>
> Are you sure you're using this same user and
> server in Eclipse?
Yes, I'm sure I could connect with the user 'macamba'. For development purposes I use username and password hard coded in the code. I've been doing it all the time. Only in production situations I comment out username and password. And I am able to login into my database using phpMyAdmin using this username and password.
class nl.mydatabase.tk.LoginDialog - actionPerformed: user 'macamba' with password 'BiGsEcReT' is trying to login
And in my logging I see what database (url and so on) I'm using, and what username/password combination:
class nl.mydatabase.tk.dao.DAOFactory getInstance, properties='myapplication.jdbc', url='jdbc:mysql://localhost:3306/myapplication'
I have read the page (https://dev.mysql.com/doc/refman/5.7/en/password-expiration-sandbox-mode.html.) you mentioned. That's why I wrote the result of the query in my original question.
Anyway. You would think logging using a terminal would solve the problem:
C:\wamp\bin\mysql\mysql5.7.9\bin>mysql -u macamba -p
Enter password: *********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 98
Server version: 5.7.9 MySQL Community Server (GPL)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use timekeeper;
Database changed
mysql> set password = password('BiGsEcReT2');
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql>
And next I tried to run my code again hoping everything is solved. But alas, not. Still my password is expired.
mysql> select user, host, password_last_changed, password_lifetime, password_expired from mysql.user where user='macamba';
+----------+-----------+-----------------------+-------------------+------------------+
| user | host | password_last_changed | password_lifetime | password_expired |
+----------+-----------+-----------------------+-------------------+------------------+
| macamba | localhost | 2017-04-08 16:08:16 | 0 | N |
+----------+-----------+-----------------------+-------------------+------------------+
1 row in set (0.00 sec)
So, for what it's worth, you can see I'm trying the heck out in this problem, but not getting anywhere fast.