For linuxmysqljdbc permission problems, first go to mysql and log on to mysql as root, and then enter the following content.
Mysql> grant all privileges on [dbname]. * to '[user]' @ '[hostname]'
Identified by '[password]';
Exception:
When DateTest is run, the screen prompts "Server configuration denies access to data source"
Solution:
First enter mysql and log on as root, and then enter the following content.
Mysql> grant all privileges on [dbname]. * to '[user]' @ '[hostname]'
Identified by '[password]';
(Note: Here, replace dbname with your database name, which is test in DateTest; replace user with your user name, which is root by the author; replace the hostname with the machine on which the java program runs. The author runs the hostname on the local machine, that is, 'localhost'. replace the password with the password of your mysql User. The author has no password, that is ''.)