Hi, I am trying an INSERT INTO statement in my java program.
The query is for a user to create an account, input a username and password and that should save to the MySQL database. I obviously don't what the passwords to be shown in the database.
Here is the query: -
"INSERT INTO accounts (username, password) VALUES (?, AES_ENCRYPT(?, 'key'))");
I seem to be getting errors:
ERROR: Data truncation: Data too long for column 'password' at row 1