
JDBC
流年丶只是记忆
这个作者很懒,什么都没留下…
展开
-
Data truncation: Truncated incorrect DOUBLE value: 'xiaodi'
sql 语句:String sql = "UPDATE users SET u_name = ? and u_password = ? where u_id = ?"; 正确的是String sql = "UPDATE users SET u_name = ? , u_password = ? where u_id = ?"; 连接条件不能用and 用 ,原创 2016-06-30 13:48:09 · 487 阅读 · 0 评论 -
数据库权限管理
DCL * 一个项目创建一个用户!一个项目对应的数据库只有一个! * 这个用户只能对这个数据库有权限,其他数据库你就操作不了了! 1. 创建用户 * CREATE USER 用户名@IP地址 IDENTIFIED BY '密码'; > 用户只能在指定的IP地址上登录 * CREATE USER 用户名@'%' IDENTIFIED BY '密码';转载 2016-06-28 13:20:23 · 488 阅读 · 0 评论 -
解决:Connections could not be acquired from the underlying database!
以上问题可能有一下原因造成: 1,驱动配置有误:driver=com.mysql.jdbc.Driver 2,数据库连接地址有误:url=jdbc:mysql://localhost:3306/test?3useUnicode=true&characterEncoding=utf8 3,密码或帐号有误:username=root password=root 4,数据库转载 2016-05-02 20:50:48 · 430 阅读 · 0 评论 -
JDBC出现这个错误的解决办法Connections could not be acquired from the underlying database!
以上问题可能有一下原因造成: 1,驱动配置有误:driver=com.mysql.jdbc.Driver 2,数据库连接地址有误:url=jdbc:mysql://localhost:3306/test?3useUnicode=true&characterEncoding=utf8 3,密码或帐号有误:username=root password=root 4,数据库转载 2016-05-02 20:47:11 · 2277 阅读 · 0 评论