java连接mysql,连接不上

java连接mysql,连接不上,第1张

需要添加driver的包到java运行环境

Usage: java [-options] class [args...]

(to execute a class)

or java [-options] -jar jarfile [args...]

(to execute a jar file)

where options include:

-d32 use a 32-bit data model if available

-d64 use a 64-bit data model if available

-server to select the "server" VM

The default VM is server.

-cp <class search path of directories and zip/jar files>

String driver="com.mysql.jdbc.Driver"//把driver换成这个重新连接一下,看一下还有错误吗

String url="jdbc:mysql://127.0.0.1:3306/scutcs"//url改成这样


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/8591728.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-18
下一篇 2023-04-18

发表评论

登录后才能评论

评论列表(0条)

保存