I am developing a login system with connection to a database of a client, but at the time of confirming the user and password send this error:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: COLLATION 'utf8_bin' is not valid for CHARACTER SET 'latin1'
In the confirmation code I put collate utf8_bin ... this had previously worked for me in local database queries.
Here is the code of the query:
String Consulta = "select * from usuarios where Usuario ='" + user + "' collate utf8_bin and Contrasena ='" + pass + "' collate utf8_bin";