小白一枚,请假一下密码加密后保存到数据库怎么弄,在此先感谢!
如图对密码 :123456 进行加密但是在存入数据库的时候却存不进去,报错如下:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'insert into users(name,pwd) values('admin',x'7E98B49020C6B2B1C3811B8F9AEE662' at line 1
在网上查了一些说是要改数据库编码和配置文件设置,我做了如下更改:
1、配置文件
2、mysql 下的 my.ini 更改 ,原utf8改为utf8mb4
改了过后还是报错,很烧脑!不知道怎么处理!!