[Seasar-user:12912] Re: mysqlのjdbc設定について質問

kubo [E-MAIL ADDRESS DELETED]
2008年 2月 17日 (日) 22:45:01 JST


久保です。

こんばんは、布施さん

> Caused by: java.sql.SQLException: null,  message from server: "Host
> '192.168.1.14' is not allowed to connect to this MySQL server"

単純にエラーメッセージからGoogle検索してみただけですが、
http://dev.mysql.com/doc/refman/4.1/ja/access-denied.html
が、参考になるかもしれません。

2008/2/17 布施雄一 <[E-MAIL ADDRESS DELETED]>:
> 初めまして。
> こちらのメーリングリストでは初メールとなります 1/5というものです。
>
> jdbcの設定について質問です。
> WEB-DB PRESS vol41の記事を参考にしつつ、自宅の環境で動かそうと環境を設定してるのですが
> jdbcの設定のことで質問があります。
> 環境としては、自宅LANにてDBサーバとして用意してある 192.168.1.13 の上に
> mysqlのversion: 5.0.27-standard を準備して
> 開発端末側のJDBCドライバとして、mysql-connector-java-5.0.8-bin.jar を用意してあります。
>
> seasar2のdbfluteを利用して、デモを動かそうとしているのですが
> 「/seasardemo/dbflute_demo/replace-schema.bat」を実行すると
> 下記に引用しているLOGのエラーが発生して、成功しません。
> どこから見直せばよいか、助言をいただけませんか?
>
> /seasardemo/dbflute_demo/dfprop/databaseInfoMap.dfprop には下記の設定を入れてあります。
> map:{
>         ; driver                = com.mysql.jdbc.Driver
>         ; url                   = jdbc:mysql://192.168.1.13:3306/dbflutedemo
>         ; schema                = root
>         ; user                  = root
>         ; password              = aaaaa
> }
>
> 2008-02-17 15:53:40,062 [main] DEBUG
> (DfAntTaskUtil#getBuildProperties():62) - Using contextProperties
> file: C:\Documents and
> Settings\y\workspace\seasardemo\mydbflute\dbflute-0.6.3\build.properties
> 2008-02-17 15:53:40,062 [main] DEBUG
> (DfAntTaskUtil#getBuildProperties():90) - [Properties]: size=7
> 2008-02-17 15:53:40,062 [main] DEBUG
> (DfAntTaskUtil#getBuildProperties():94) -     torque.packageBase =
> sample.dbflute
> 2008-02-17 15:53:40,062 [main] DEBUG
> (DfAntTaskUtil#getBuildProperties():94) -     torque.database = h2
> 2008-02-17 15:53:40,062 [main] DEBUG
> (DfAntTaskUtil#getBuildProperties():94) -     torque.s2daoVersion =
> 1.0.47
> 2008-02-17 15:53:40,062 [main] DEBUG
> (DfAntTaskUtil#getBuildProperties():94) -     torque.targetLanguage =
> java
> 2008-02-17 15:53:40,062 [main] DEBUG
> (DfAntTaskUtil#getBuildProperties():94) -     torque.project = demo
> 2008-02-17 15:53:40,062 [main] DEBUG
> (DfAntTaskUtil#getBuildProperties():94) -
> torque.daoSqlFileEncoding = UTF-8
> 2008-02-17 15:53:40,062 [main] DEBUG
> (DfAntTaskUtil#getBuildProperties():94) -
> torque.jdbcToJavaNativeMap =
> map:{TINYINT=java.lang.Integer;SMALLINT=java.lang.Integer;INTEGER=java.lang.Integer;BIGINT=java.lang.Long}
> 2008-02-17 15:53:40,093 [main] INFO
> (DfSimpleDataSourceCreator#create():101) - ...create()
> 2008-02-17 15:53:40,093 [main] INFO
> (DfReplaceSchemaTask#doExecute():72) - * * * * * * * * * * *
> 2008-02-17 15:53:40,093 [main] INFO
> (DfReplaceSchemaProperties#getReplaceSchemaDefinitionMap():31) -
> ...Initializing replaceSchemaDefinitionMap: {}
> 2008-02-17 15:53:40,093 [main] INFO
> (DfReplaceSchemaTask#doExecute():73) - environmentType: ut
> 2008-02-17 15:53:40,093 [main] INFO
> (DfReplaceSchemaTask#doExecute():74) - * * * * * * * * * * *
> 2008-02-17 15:53:40,093 [main] INFO
> (DfReplaceSchemaTask#doExecute():75) - isReplaceSchemaAutoCommit    =
> true
> 2008-02-17 15:53:40,093 [main] INFO
> (DfReplaceSchemaTask#doExecute():76) - isReplaceSchemaRollbackOnly  =
> false
> 2008-02-17 15:53:40,093 [main] INFO
> (DfReplaceSchemaTask#doExecute():77) - isReplaceSchemaErrorContinue =
> true
> 2008-02-17 15:53:40,218 [main] ERROR (DfAbstractTask#execute():74) -
> execute() threw the exception!
> Driver#connect() threw the exception:
> _url=jdbc:mysql://192.168.1.13:3306/dbflutedemo
>         at org.seasar.dbflute.helper.jdbc.connection.DfSimpleDataSourceCreator.newConnection(DfSimpleDataSourceCreator.java:193)
>         at org.seasar.dbflute.helper.jdbc.connection.DfSimpleDataSourceCreator.getConnection(DfSimpleDataSourceCreator.java:179)
>         at org.seasar.dbflute.helper.jdbc.connection.DfSimpleDataSourceCreator$DfSimpleDataSource.getConnection(DfSimpleDataSourceCreator.java:153)
>         at org.seasar.dbflute.helper.jdbc.schemainitializer.DfSchemaInitializerJdbc.callbackTruncateTableByJdbc(DfSchemaInitializerJdbc.java:61)
>         at org.seasar.dbflute.helper.jdbc.schemainitializer.DfSchemaInitializerJdbc.truncateTableIfPossible(DfSchemaInitializerJdbc.java:50)
>         at org.seasar.dbflute.helper.jdbc.schemainitializer.DfSchemaInitializerJdbc.initializeSchema(DfSchemaInitializerJdbc.java:37)
>         at org.seasar.dbflute.task.DfReplaceSchemaTask.initializeSchema(DfReplaceSchemaTask.java:110)
>         at org.seasar.dbflute.task.DfReplaceSchemaTask.doExecute(DfReplaceSchemaTask.java:79)
>         at org.seasar.dbflute.task.bs.DfAbstractTask.execute(DfAbstractTask.java:69)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
>         at org.apache.tools.ant.Task.perform(Task.java:348)
>         at org.apache.tools.ant.Target.execute(Target.java:357)
>         at org.apache.tools.ant.Target.performTasks(Target.java:385)
>         at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
>         at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
>         at org.apache.tools.ant.Main.runBuild(Main.java:698)
>         at org.apache.tools.ant.Main.startAnt(Main.java:199)
>         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
>         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
> Caused by: java.sql.SQLException: null,  message from server: "Host
> '192.168.1.14' is not allowed to connect to this MySQL server"
>         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
>         at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:997)
>         at com.mysql.jdbc.Connection.createNewIO(Connection.java:2670)
>         at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
>         at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
>         at org.seasar.dbflute.helper.jdbc.connection.DfSimpleDataSourceCreator.newConnection(DfSimpleDataSourceCreator.java:191)
>         ... 25 more
> _______________________________________________
> Seasar-user mailing list
> [E-MAIL ADDRESS DELETED]
> https://ml.seasar.org/mailman/listinfo/seasar-user
>


Seasar-user メーリングリストの案内