- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我昨天一直在互联网上搜索这个问题...我是 JDBC 的初学者,但是这里和其他网站提供的解决方案不适合我。
我正在 Linux Mint 32 位上使用“mysql-connector-java-5.1.18-bin.jar
”..我正在使用 Eclipse 3.8 ...我已经安装了 mySQL-server 并它正在运行(我使用以下命令运行它:sudo service mysql start
)...在运行时我收到此错误
connecting to psysical database...
java.sql.SQLException: No suitable driver found for dbc:mysql://localhost:8080/kholofedb
at java.sql.DriverManager.getConnection(DriverManager.java:604)
at java.sql.DriverManager.getConnection(DriverManager.java:221)
at com.psybergate.database.SimbleCode.main(SimbleCode.java:21)
这是我的源代码:
package com.psybergate.database;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Scanner;
public class SimbleCode
{
private static final String USER = "root" , PASS = "";
public static void main(String ...args)
{
try {
String connectionURL = "dbc:mysql://localhost:8080/kholofedb";
Class.forName("com.mysql.jdbc.Driver");
// Class.forName("org.postgresql.Driver");
System.out.println("connecting to psysical database...");
Connection conn = DriverManager.getConnection(connectionURL , USER , PASS);
Statement statement = conn.createStatement();
System.out.println("Connection has been made");
Scanner keyBoardScanner = new Scanner(System.in);
System.out.println("Enter table name:");
String tableName = keyBoardScanner.nextLine();
System.out.println("Creating table...");
statement.executeQuery("create table " + tableName + " (name , age ,salary)");
System.out.println("Table successfully created");
System.out.println("Inserting data into the table ...");
statement.executeUpdate("insert into " + tableName + "values (kholofelo , 21 , 9969696)");
}
catch (ClassNotFoundException | SQLException e) {
e.printStackTrace();
}
}
}
提前致谢:)
最佳答案
您的连接 URL 应以“jdbc:”开头,而不是“dbc:”
关于java - 没有找到适合 dbc :mysql://localhost:8080/kholofedb 的驱动程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15830835/
是否可以使用 dbc.Col 和 dbc.Row 函数来设置网格布局而不使用 Bootstrap 主题? 当添加例如 codepen.io css 样式表时,即使在指定行和列时,它也会显示垂直堆叠的所
如果我有以下几点: void Foo(Bar bar, Baz baz) { // Do something with bar, but not with baz. } ...然后 ReSha
请问scala.dbc是否支持存储过程? 我正在使用的 mysql jdbc 后端支持它,代码插图显示它是如何工作的加分。 最佳答案 我认为 Scala dbc 不再有任何工作要做。您将不得不等待 S
很难说出这里问的是什么。这个问题是含糊的、模糊的、不完整的、过于宽泛的或修辞性的,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开它,visit the help center 。 已关
我正在尝试弄清楚如何向 .dbc 文件添加注释,但 DBC 规范似乎没有解决这个问题。 我尝试添加 // 并且它似乎有效,但我不想依赖未定义的行为。 最佳答案 我还没有找到任何方法在 DBC 文件中的
我正在做 DBSCAN 聚类,除了我想在聚类结果中看到的纬度经度之外,我还有一列。例如数据如下所示: 28.6029445 77.3443552 1 28.6029511 77.3443573
我正在使用 C# 4.0 的契约(Contract),之前我使用大量单元测试(不是 TDD)。我想知道 DbC 是否消除了编写外部单元测试的需要? 我个人认为契约更适合构建健壮的框架,因为契约与代码本
已结束。此问题正在寻求书籍、工具、软件库等的推荐。它不满足Stack Overflow guidelines 。目前不接受答案。 我们不允许提出寻求书籍、工具、软件库等推荐的问题。您可以编辑问题,以便
我昨天一直在互联网上搜索这个问题...我是 JDBC 的初学者,但是这里和其他网站提供的解决方案不适合我。 我正在 Linux Mint 32 位上使用“mysql-connector-java-5.
我在 Microsoft 内部 SharePoint 网站上工作,我需要从跨域 SharePoint 网站中提取列表数据。 出于各种原因,我不想使用 Silverlight,而且目前无法实现业务数据连
我试图在单击搜索按钮时加载表格,并提供 ID/密码。我的输出是一个允许 df 参数的 dbc.Table.from_dataframe;但是,当我将其用作输出属性时,出现错误。 以下是“my_tabl
我被指示用 c++ 编写一个测试程序,该程序能够从 visual fox pro 数据库中读取数据。我只获得了文件,但无法从这些文件中读取数据。 我在网上找到了一些能够成功打开访问文件的代码,并且我能
关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。 想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。 6年前关闭。 Improve thi
我是一名优秀的程序员,十分优秀!