I am experiencing my Java application from time to time fail to connect throwing the following error:
- Code: Select all
failed to open a connection to the database server: failed to connect to db server - null, message from server: "Host 'localhost' is not allowed to connect to this MariaDB server"
My my.cnf is as follows:
- Code: Select all
[mysqld]
user=root
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-external-locking
key_buffer_size = 2048M
max_allowed_packet = 10M
table_open_cache = 10240
table_definition_cache = 10240
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
open_files_limit=204800
event_scheduler=on
max_heap_table_size=3072MB
wait_timeout=345600
max_connections=500
The application is connecting on localhost
- Code: Select all
jdbc:mysql://127.0.0.1:3306/datacell_db
Please advise.
Best regards,