• 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. Yarn状态机

    1 概述 为了增大并发性,Yarn采用事件驱动的并发模型,将各种处理逻辑抽象成事件和调度器,将事件的处理过程用状态机表示.什么是状态机? 如果一个对象,其构成为若干个状态,以及触发这些状态发生相互转移 ...

  2. 解析复杂的嵌套数据结构-jsonpath

    JsonPath是一种简单的方法来提取给定JSON文档的部分内容. JsonPath有许多编程语言,如Javascript,Python和PHP,Java. JsonPath提供的json解析非常强大 ...

  3. go无缓冲通道

    package main import ( "fmt" "math/rand" "sync" "time" ) //wg ...

  4. qt 添加本程序的注册表项

    QStringcmd; cmd.clear(); QStringapplication_path=QCoreApplication::applicationFilePath();//带文件扩展名的全路 ...

  5. linux redis 设置密码:

    在服务器上,这里以linux服务器为例,为redis配置密码. 1.第一种方式 (当前这种linux配置redis密码的方法是一种临时的,如果redis重启之后密码就会失效,) (1)首先进入redi ...

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

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

  7. Windows 10、Ubuntu 18.04 双系统 双硬盘 安装经验总结

    首先说明,我假设读者懂得分区.安装系统,所以不再深入讨论具体操作. 如果需要手把手教程,建议先参考其它Windows中加装Linux的相关文章. 网上其它文章.教程的常见问题是,各家机器配置不一样,安 ...

  8. HmacSHA256算法(C# 和 Java)

    Java代码: /** * HmacSHA256算法,返回的结果始终是32位 * @param key 加密的键,可以是任何数据 * @param content 待加密的内容 * @return 加 ...

  9. 区块链学习(四)truffle部署编译智能合约以太坊私有链

    前面我们介绍了以太坊私有链的搭建以及多节点私有链网络,这次我们介绍如何使用truffle框架来部署编译智能合约到我们之前搭建的私有链网络中. 搭建环境及需使用的工具:ubuntu18.04  Truf ...

  10. [学习笔记] Blender layout 视图切换

    layout 数字键5  --- 正交视图/透视图 切换 数字键0 -- 摄像机视图 数字键7 -- 顶视图 数字键1 --- 前视图 数字键3 --- 右视图 ctrl +数字键3 --- 左视图 ...