java连接mysql,连接不上

2024-11-23 12:53:41
推荐回答(2个)
回答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

回答2:

不是告诉你了么,没有驱动撒,把驱动JAR导入就好了