【java】【eclipse】jdbc连接mysql

Java报错javax.net.ssl.SSLException MESSAGE: closing inbound before receiving peer‘s close_notify解决方法 文章目录一、问题描述二、解决方法总结 一、问题描述 在利用SpringBoot开发项目时发现控制台中报了javax.net.ssl.SSLException MESSAGE: closing inbound before receiving peer's close_notify的错误,但是并没有影响程序的正常运行,网络上搜索了很多种方法都没有解决了,偶然间看到一篇博客写到了解决的方法并成功解决了报错,在此进行记录。 Mon Sep 13 09:48:11 CST 2021 WARN: Caught wh 阅读详情

【java】【eclipse】jdbc连接mysql8.0.13错误


摘要
driver问题:……mysql.jdbc……改成……mysql.cj.jdbc……
time zone value问题:url追加serverTimezone=GMT%2B8
SSL问题:url追加useSSL=FALSE

先按照我一开始知道的方式写(去掉了全部功能,另外static修饰的变量直接写在main里就不用加static了)

import java.sql.*;
public class JDBC_frist
{
    static String url ="jdbc:mysql://127.0.0.1:3306/mydatabase",
    		user = "root", pwd = "1234";
    static Connection con = null;
    static Statement sql = null;
    static ResultSet rs = null;
    
    public static void main(String[] args)
    {
    	// 驱动driver
    	try {Class.forName("com.mysql.jdbc.Driver");}
    	catch(ClassNotFoundException cnfe)
    	{System.out.println(cnfe.getMessage());}
    	// 操作
    	try
    	{
    		con = DriverManager.getConnection(url, user, pwd);
    		sql = con.createStatement();
    		rs = sql.executeQuery("SELECT * FROM customers");
    		con.close();
    	}
    	catch(SQLException se) 
    	{System.out.println(se.getMessage());}
    }
}

运行之后,出现了不少问题(其中第一行的是红色)。

Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
The server time zone value '???ú±ê×??±??' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.

第一行的问题容易解决,把 // 驱动driver 下方try里的内容

Class.forName("com.mysql.jdbc.Driver");

改为

Class.forName("com.mysql.cj.jdbc.Driver");

第二个问题经查找,出现这个的原因是因为 mysql返回的时间总是有问题,比实际时间要早8小时。在jdbc连接的url后面加上serverTimezone=GMT即可解决问题,如果需要使用gmt+8时区,需要写成GMT%2B8
也就是将url改为

 "jdbc:mysql://127.0.0.1:3306/mydatabase?serverTimezone=GMT%2B8"

但是再次运行,又出现了新的错误(***是我加的和谐啦)

Sat Dec 22 17:29:55 CST 2018 WARN: Caught while disconnecting...

EXCEPTION STACK TRACE:



** BEGIN NESTED EXCEPTION ** 

javax.net.ssl.SSLException
MESSAGE: closing inbound before receiving peer's close_notify

STACKTRACE:

javax.net.ssl.SSLException: closing inbound before receiving peer's close_notify
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:129)
	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:308)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:264)
	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:255)
	at java.base/sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:645)
	at java.base/sun.security.ssl.SSLSocketImpl.shutdownInput(SSLSocketImpl.java:624)
	at com.mysql.cj.protocol.a.NativeProtocol.quit(NativeProtocol.java:1312)
	at com.mysql.cj.NativeSession.quit(NativeSession.java:182)
	at com.mysql.cj.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:1750)
	at com.mysql.cj.jdbc.ConnectionImpl.close(ConnectionImpl.java:720)
	at ***.JDBC_frist.main(JDBC_frist.java:32)


** END NESTED EXCEPTION **

我找了一转,最后采用了关闭SSL的方式绕开这个问题。一提EXception无法处理这个异常,也catch不到javax.net.ssl.SSLException这个异常(甚至写进去就报错)。
关闭SSL方式如下:

String url ="jdbc:mysql://127.0.0.1:3306/mydatabase?useSSL=FALSE&serverTimezone=GMT%2B8",

注意’:

  • ?'必须打
  • ‘&‘不能打成’,’(打成‘&&’虽然还看不出来什么问题,还是不要作比较好)
  • FALSE不能小写

差点忘了
time zone问题解决利用:https://blog.youkuaiyun.com/weixin_37577564/article/details/80329775
SSL问题解决利用:http://www.cnblogs.com/television/p/8529963.html

MySQL的Java连接器在Eclipse中的配置及使用(JDBC) 使用java访问mysql数据库 mysql-connector-java-version.jar在Eclipse中的配置 阅读详情

相关推荐

IBTrACS v04r01 数据提取实战:Pandas 筛选 JTWC/CMA/JMA 3机构最佳路径数据

本文详细介绍了如何使用 Pandas 高效提取和处理 IBTrACS v04r01 数据集中的最佳路径数据,特别针对 JTWC、CMA 和 JMA 三家权威机构的数据进行对比分析。通过构建可复用的数据提取函数,解决多机构数据质量差异问题,并提供高级分析与可视化应用示例,助力热带气旋研究。

clijovtbq401783153的博客 517

WARN: Caught while disconnecting... EXCEPTION STACK TRACE: ** BEGIN NESTED EXCEPTION ** 解决方法

在服务器上运行服务时,出现报错。

~~~~~~~BUG FLY~~~~~~~~~ 2048

ComfyUI Impact Pack实战:如何用三大检测器打造高效人脸修复工作流(附2025最新模板)

本文详细解析了如何利用ComfyUI Impact Pack中的BBOX、Segm和SAM三大检测器构建高效人脸修复工作流。通过技术选型、参数优化和实战案例,帮助用户掌握从精准定位到细节修复的全流程技巧,特别适用于商业摄影和影视制作场景。文章还提供了2025年最新模板和性能优化方案,显著提升人脸精修效率。

weixin_29040367的博客 245

IDEA2021.3在连接jdbc驱动以及mysql数据库遇到的错误

Exception in thread "main" java.sql.SQLException: The server time zone value '???��������??��??' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to u

weixin_64064226的博客 5397

基于STM32的家用新风系统智能控制器 | 保姆式教程 开源可复刻

本项目基于STM32F103C8T6核心控制器,完整实现了家用新风系统智能控制器的全功能开发,覆盖多传感器数据采集、双模式控制、PID调速、异常报警、掉电记忆等核心功能,全程采用保姆式无跳步教学,从硬件选型、接线、CubeMX配置、代码开发、调试排坑全流程拆解,跟着步骤一步步操作,就能顺利完成项目复刻

ZhongWeiXiang9的博客 466

从Level 1到Level 22:手把手带你用Burp Suite通关burp-labs靶场全关卡(附难点解析)

本文详细解析了如何使用Burp Suite通关burp-labs靶场的22个关卡,从基础爆破到复杂编码绕过,涵盖Intruder配置、响应过滤、POST请求处理、MD5爆破等关键技术。特别针对Level 16的三重编码和Level 20的中文响应处理等难点提供实战技巧,帮助渗透测试工程师提升Web安全实战能力。

weixin_28831461的博客 436

javax.net.ssl.SSLException: closing inbound before receiving peer's close_notify解决办法

Tue Jan 21 22:19:40 CST 2020 WARN: Caught while disconnecting… EXCEPTION STACK TRACE: ** BEGIN NESTED EXCEPTION ** javax.net.ssl.SSLException MESSAGE: closing inbound before receiving peer’s close_not...

qq_38454176的博客 5278

基于PWM的汽车仪表步进电机微步驱动优化实践

本文深入探讨了基于PWM的微步驱动技术,用于优化汽车仪表步进电机的运行性能。通过将传统的分步驱动升级为PWM微步细分驱动,利用正弦/余弦查表法合成旋转磁场,有效消除了指针抖动与噪声,实现了指针的平滑、精准运动。文章以STM32和VID2905电机为例,提供了详细的硬件连接、代码实现及高级优化技巧,为提升汽车仪表体验提供了实用方案。

weixin_29169505的博客 512

SSL错误

最近在使用数据库是报以下错误 Fri Jan 18 10:10:26 CST 2019 WARN: Caught while disconnecting... EXCEPTION STACK TRACE:   ** BEGIN NESTED EXCEPTION ** javax.net.ssl.SSLException MESSAGE: closing inbound before re...

qq_41023427的博客 5043

2025华为OD 面试手撕代码真题【字符串至多删除一个字符,是否能构成回文串】

2025华为OD 面试手撕代码真题【字符串至多删除一个字符,是否能构成回文串】

MISAYAONE的博客 1707

Android影像系统架构专家面试指南

传音控股招聘影像系统架构专家,要求8年以上开发经验,5年架构设计经验,精通Android Camera开发及性能优化。该职位需负责手机影像软件架构设计、技术选型及跨平台适配,重点解决"快稳省"体验优化。面试评估聚焦三大维度:技术方面考察HAL层架构设计、多帧合成优化等能力;系统开发关注低光降噪等场景的算力平衡;团队管理侧重跨部门协作与项目交付。候选人需展现对CamX-CHI等架构的深入理解,具备量化分析性能指标的能力,并能主导旗舰机影像项目全周期落地。

郑伟强dev的专栏 945

Java(eclipse)通过jdbc连接mysql(navicat)

今天我将介绍一下如何让Java连接到MySQL数据库 工具:eclipse+mysql+navicat 首先我们先下载MySQL与navicat mysql的下载网址:https://dev.mysql.com/downloads/windows/installer/8.0.html 选择这个下载: navicat的下载网址:https://www.navicat.com.cn/prod...

我就是这样的自己的博客 2万+

《Python入门到精通》函数详解

函数就是一段「封装」起来的「代码」,目的是提高代码的「模块性」和「复用性」。 2、函数的参数 2.1、变量的就近原则 2.2、传递参数 2.3、形参和实参 2.4、位置参数 2.5、缺省参数 2.6、可变类型和不可变类型 2.7、关键字参数 3、匿名函数 4、函数的返回值

wangyuxiang946的博客 1万+

eclipse工具连接mysql_Java(eclipse)通过jdbc连接mysql(navicat)

版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。本文链接:https://blog.csdn.net/weixin_42412973/article/details/88717255今天我将介绍一下如何让Java连接到MySQL数据库工具:eclipse+mysql+navicat首先我们先下载MySQL与navicat选择这个下载:下载完后,我...

weixin_39965881的博客 1092

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

eclipse JAVA JDBC连接MySQL 8.0数据库

为了成功在JAVA程序中连接MYSQL数据库,我真的是踩了无数个坑。好了,为了造福大家我写篇教程让大家避开坑而快速上手。 步骤1:下载文件 我默认大家eclipse jdk什么的都已经弄好了,直接从MYSQL开始 直接在官网下最新版本就行了(不要用老师给的旧版本,太坑了!!!) 官网下载直达链接:https://dev.mysql.com/downloads/windows/installer/ ...

biu_bui_biu的博客 4083

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

Java JDBC连接MySQL(Eclipse)

1. MySQL JDBC驱动下载2.导入MySQLJDBC驱动Eclipse: Build Path->Libraries->Add External JARs…->mysql-connector-java-5.0.8-bin.jar650) this.width=650;" src="http://img1.51cto.com/attachment/201308/151654581.png"

handan725的专栏 304

【Java】eclipse安装JDBC连接MySQL数据库教程

首先在官网中下载JDBC,下载地址:MySQL :: MySQL Connectors 如果无法进入官网可以点击这里下载:https://download.csdn.net/download/weixin_47040861/88855729进入官网后找到Develop by MySQL一栏,在该栏下找到JDBC,点击右侧Download:然后就进入了版本选择界面,不同操作系统使用的版本不同,Windows可以选择Platform Independent版:然后选项卡下方就会出现对应的JDBC下载链接,不要下

weixin_47040861的博客 3539

eclipse如何连接mysql_JDBC——Java数据库连接(mysql)

一、JDBC概述JDBC(Java Database Connectivity)可以实现通过Java代码对数据库进行增删改查的操作,可以把它视为沟通Java与数据库的桥梁。在Java.sql包中提供了基础的API文档,其中的类可以帮助进行数据库的操作。由于数据库产商的不同需要的驱动程序也就不同。在本篇文章中,我将介绍Java与mysql数据库连接的方法。一定要认准mysql的海豚Logo,否则可能...

weixin_39987120的博客 366

Java如何使用eclipse配置JDBC连接MySql

配置环境:mysql5.7.22 JDK1.8 一、Java连接mysql需要驱动包,下载地址为:https://dev.mysql.com/downloads/connector/j/,打开网页之后选择Platform Independent,然后下载驱动包把驱动包解压到合适的目录,如下图。 解压后得到jar库文件,然后在eclipse对应的项...

睡觉也能赚钱 1628

JAVA使用JDBC连接MySql数据库 (eclipse)

小白一枚,在连接数据库花了一番功夫,所以想写一篇文章总结一下。 我用的是数据库是5.7版本的,JDBC是从官网下载的最新的8.0.17版本的。 加载数据库驱动 加载完毕之后来测试代码 import java.sql.*; public class Demo01 { public static void main(String[] args){ // 驱动程序名 ...

迷途的大橘 1368

Mac下的Mysql和Navicat for Mysql的安装和Eclipse中Java的JDBC连接

1. 下载MySQL Community Server https://dev.mysql.com/downloads/mysql/ 安装时一路向下即可,但一定要记住你的用户名和密码 安装完成后,会在系统偏好设置中找到Mysql,点进去, 开启服务(Start Mysql Server),这时会需要你的电脑密码。 2. 配置Mysql 打开终端,输入cd /usr/local/mysql/bin,...

liangxn 3805

在Eclipse中使用JDBC连接MySQL(mysql-connector-java-8.0.28版本)

版本: Java 17 MySQL 8.0 mysql-connector-java-8.0.28

Ella4的博客 1万+

JAVA_Eclipse:JDBC连接MySQL数据库的步骤

(作者:苦行者;撰写时间:2020年8月7日) 一、JDBC连接mySql数据库步骤 1、注册驱动(三种方式): (1)、DriverManager.registerDriver(new com.mysql.jdbc.Driver()); (2)、Class.forName("com.mysql.jdbc.Driver"); (3)、System.getProperty ("jdbc.Drivers","com.mysql.jdbc.Driver:com.oracle.jdbc.Driver");

weixin_44541162的博客 1548

eclipse新建java工程利用JDBC连接MYSQL数据库

JAVA利用原生的代码通过JDBC连接数据库

dream_follower的博客 3738
上一篇: Java Scanner类学习1:Next()与nextLine()
下一篇: sql server中sql语句(一)
user_987654321
博客等级 码龄8年 37粉丝 14原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值