Db update failed

Hi,
i’ve created an empty application. Then i’ve set the connection params for my db. Test connection return success.

The i run “Create database” and i get “com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.”

Tried to add an entity, same result.

Log attached.

Any help?

Thanks

studio.log (26.6 KB)

Did you follow this steps?

Yes I did, but i do not have a tomcat folder

Tried other dbs… same result

  • What went wrong:
    Execution failed for task ‘:app-core:updateDb’.

Exception when executing SQL:
create trigger SEC_ROLE_DELETE_TS_NN_TRIGGER before update on SEC_ROLE
for each row
if not(NEW.DELETE_TS <=> OLD.DELETE_TS) then
set NEW.DELETE_TS_NN = if (NEW.DELETE_TS is null, ‘1000-01-01 00:00:00.000’, NEW.DELETE_TS);
end if

because: You do not have the SUPER privilege and binary logging is enabled (you might want to use the less safe log_bin_trust_function_creators variable)

set global log_bin_trust_function_creators=1;

this solves the problem, db correctly created.

Note: this works from command line, while still fails from studio

2 Likes

Hi,

I experience the same problem.
I don’t want to use neither SUPER mysql user right nor the global setting log_bin_trust_function_creators.

Afer having read the article Use of log_bin_trust_function_creators in MySQL - Database Administrators Stack Exchange , I wonder if adding DETERMINISTIC keyword the trigger creation could solve the problem without modifying global Mysql settings.

What is your opinion?

Regard
Guillaume