- 博客(1)
- 资源 (2)
- 收藏
- 关注
原创 "Host 'xxx' is not allowed to connect to this MySQL server"解决方案
这个问题的原因是MySql服务器没允许别的机器远程登录。 修改方式:修改mysql数据库中user表,把localhost改为%。再执行下刷新语句FLUSH PRIVILEGES; OK
2012-08-23 20:35:37 446
MyEclipse_MyBatis_Generotor
把文件夹中内容放到eclipse/MyEclipse对应的文件夹中,在eclipse/MyEclipse中新建->Other->MyBatis XXX,在生成的xml中填写数据库配置信息(别忘了配置驱动jar包),右键Generator MyBatis XXX 生成。以下是我的例子:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd" >
<generatorConfiguration >
<classPathEntry location="/Users/jinweihe/plan/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.9.jar" />
<context id="context1" >
<!-- 去掉那些没用的注释 -->
<commentGenerator>
<property name="suppressAllComments" value="true" />
</commentGenerator>
<jdbcConnection driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://127.0.0.1:3306/plan"
userId="root" password="root" />
<javaModelGenerator targetPackage="com.hjw.plan.mybatis.model"
targetProject="plan" />
<sqlMapGenerator targetPackage="com.hjw.plan.mybatis.mapper"
targetProject="plan" />
<javaClientGenerator targetPackage="com.hjw.plan.mybatis.dao"
targetProject="plan" type="XMLMAPPER" />
<table tableName="plans" domainObjectName="Plan"
enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"
enableSelectByExample="false" selectByExampleQueryId="false" >
<property name="useActualColumnNames" value="true"/>
</table>
<table tableName="friendships" domainObjectName="Friendship"
enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"
enableSelectByExample="false" selectByExampleQueryId="false" >
<property name="useActualColumnNames" value="true"/>
</table>
</context>
</generatorConfiguration>
2015-08-09
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人