首先,将Mysql的驱动即jar包放到自己项目的lib文件夹下
第二,创建数据库。 通过MySQL Server下的MySQL Command Line Client创建。如下所示:
Enter password: **** //MySql的密码
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5 to server version: 5.0.20-nt
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database **** //××××为创建的数据库名字
这样在Mysql里就生成了××××数据库