• eclipse连接不上数据库
//加载驱动
//oracal.jdbc.drive.Oracle.Driver
//com.mysql.jdbc.Driver
try {
Class.forName("com.mysql.jdbc.Driver");
} catch (ClassNotFoundException e) { e.printStackTrace();
}
Connection connection = null;
try {
connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/superlee", "Lee", "6666");
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println(connection);

error:

错误原因: 连接的数据库名错误或连接的数据库未创建(不存在)。

MySQL使用中遇到的error的更多相关文章

  1. Linux mysql 5.6: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

    案例环境: 操作系统 :Red Hat Enterprise Linux Server release 5.7 (Tikanga) 64 bit 数据库版本 : Mysql 5.6.19 64 bit ...

  2. mysql 链接失败(ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES))

    mysql链接失败(ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)) 修改: # ...

  3. 处理一则MySQL Slave环境出现ERROR 1201 (HY000): Could not initialize master info structure的案例

    mysql> start slave; ERROR (HY000): Slave failed to initialize relay log info structure from the r ...

  4. MYSQL错误解决:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' ( ...

  5. Mysql drop function xxxx ERROR 1305 (42000): FUNCTION (UDF) xxxx does not exist

    mysql> drop function GetEmployeeInformationByID;ERROR 1305 (42000): FUNCTION (UDF) GetEmployeeInf ...

  6. 【转载】重置密码解决MySQL for Linux错误 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

    重置密码解决MySQL for Linux错误 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using passwor ...

  7. MySQL导入数据遇到Error Number: 1467 Failed to read auto-increment value from storage engine错误

    MySQL导入数据遇到Error Number: 1467 Failed to read auto-increment value from storage engine错误 创建表的语句 CREAT ...

  8. MySQL创建函数报“ERROR 1418 ”错误,不能创建函数

    MySQL创建函数报ERROR 1418错误,不能创建函数,根据官方提示是说,不能创建函数可能是一个安全设置方面的配置或功能未开启原因,下面我们一起来看.   错误 ERROR 1418 (HY000 ...

  9. 重置密码解决MySQL for Linux错误 ERROR 1045 (28000)

    重置密码解决MySQL for Linux错误 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using passwor ...

随机推荐

  1. class与computed一起应用

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  2. 如何设置fvOptions【翻译】

    翻译自:CFD-online 帖子地址:http://www.cfd-online.com/Forums/openfoam-pre-processing/121763-how-set-fvoption ...

  3. 定时检查SetUID 权限文件列表的脚本文件

    [root@localhost ~]# find / -perm -4000 -o -perm -2000 > /root/suid.list #-perm安装权限査找.-4000对应的是Set ...

  4. 咏南中间件和开发框架全面支持DELPHI10.3.2

    咏南中间件和开发框架全面支持DELPHI10.3.2 易博龙公司2019年7月12日发布了RAD STUDIO10.3.2正式版本. 咏南中间件自2019年7月14日始,中间件.CS框架.WEB框架. ...

  5. kill 一个名字 程序的所有进程

    ps aux | grep chrome | awk '{print $2}' | xargs kill -9

  6. Keil MDK 5代码补全功能设置

    这段时间在用Keil5编程,经常会遇到在程序文件头部定义一个全局变量.在后面的编程过程中,经常会要用到这个变量,如果每次再打这个变量名会特别麻烦和浪费时间,我就想着Keil5有没有像vs软件一样的代码 ...

  7. telnet nmap netstap

    yum install nmap [root@10-13-109-236 ~]# nmap localhost Starting Nmap 6.40 ( http://nmap.org ) at 20 ...

  8. SQL-W3School-总结:SQL 总结

    ylbtech-SQL-W3School-总结:SQL 总结 1.返回顶部 1. SQL 概要 本教程已经向您讲解了用来访问和处理数据库系统的标准计算机语言. 我们已经学习了如何使用 SQL 在数据库 ...

  9. angular中子组件通过@Output 触发父组件的方 法

    1. 子组件引入 Output 和 EventEmitter import { Component, OnInit ,Input,Output,EventEmitter} from '@angular ...

  10. 【转载】 AutoML相关论文

    原文地址: https://www.cnblogs.com/marsggbo/p/9308518.html ---------------------------------------------- ...