为Spring-MVC项目配置MySQL数据库 [英] Configure MySQL db for a Spring-MVC project
本文介绍了为Spring-MVC项目配置MySQL数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我目前的数据库属性如下:
My current Database properties are as follows:
我希望我的数据库 MySQL
。有人可以指导我如何更改属性,以便它保存在 MySQL
。
I want my Database to be MySQL
. Can someone please guide me how to change the properties so it gets saved in MySQL
.
我已安装<$我的 Mac OSX
上的c $ c> MySQL 。用户名是 Root12
,密码是 xxx
I have installed MySQL
on my Mac OSX
. The Username is Root12
and password is xxx
推荐答案
好吧,你只需要适当地替换所有属性:
Well, you just need to replace all the properties appropriately:
- driverClassName通常是
com.mysql.jdbc.Driver
- 网址应该像
jdbc:mysql:// host:3306 / databaseName
- 您已拥有的用户名和密码
- dialect取决于您正在使用的ORM,对于hibernate 这里是列表
- the driverClassName is usually
com.mysql.jdbc.Driver
- the url should be like
jdbc:mysql://host:3306/databaseName
- the username and password you already have
- dialect depends on ORM you are using, for ex for hibernate here is the list
这是基本配置
这篇关于为Spring-MVC项目配置MySQL数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文