1

Mysql doc, пункт 6 !

  • Следую MySql установки по документации.

    Установил root пароль с помощью MySQL Installation Wizard. Тот пароль, который я пишу в Tomcat Realm server.xml.
    При входе через MySql Workbench на свой connection все нормально, но при попытке получить доступ через Realm настройку JDBC Connector по тому же паролю, вызывает ошибку. Из этого источника тоже не помогает

  • Выполняю MySql 3 и 6 пункты по документации. В конце после выполнения программы получаю в cmd: Дал пример ошибки внизу!

  • В чём может быть проблема ? Я уже без вариантов,буду рад помощи!

    C:\Program Files (x86)\MySQL\MySQL Server 5.7\bin>mysqld.exe --default-file="my.ini" --init-file="C:\Users\Maks\Desktop\mysql-init.txt" --console

    2016-08-01T20:44:58.017811Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated.

    Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

    2016-08-01T20:44:58.017811Z 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.

    2016-08-01T20:44:58.018799Z 0 [Note] mysqld.exe (mysqld 5.7.11) starting as process 7408 ...

    2016-08-01T20:44:58.045232Z 0 [ERROR] Plugin keyring_file reported: 'keyring_file initialization failure. Please check if the keyring_file_data points to readable keyring file or keyring file can be created in the specified location. The keyring_file will stay unusable until correct path to the keyring file gets provided'

mysqld: Table 'mysql.plugin' doesn't exist 2016-08-01T20:44:59.335246Z 0 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it. 2016-08-01T20:44:59.349387Z 0 [ERROR] unknown variable 'default-file=my.ini' 2016-08-01T20:44:59.351372Z 0 [ERROR] Aborting

==================================================================

java.sql.SQLException: Access denied for user 'root;password=plemia000'@'localhost' (using password: NO) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3878) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:871) at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1694) at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1215) at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2255) at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2286) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2085) at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:795) at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:44) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:400) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:327) at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:663) at org.apache.catalina.realm.JDBCRealm.startInternal(JDBCRealm.java:726) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) at org.apache.catalina.realm.CombinedRealm.startInternal(CombinedRealm.java:249) at org.apache.catalina.realm.LockOutRealm.startInternal(LockOutRealm.java:120) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:904) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:441) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:769) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) at org.apache.catalina.startup.Catalina.start(Catalina.java:629) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)

 <Realm className="org.apache.catalina.realm.JDBCRealm"
      driverName="com.mysql.jdbc.Driver"
      connectionURL="jdbc:mysql://localhost:3306/coupon_system?user=root;password=plemia000"
      userTable="user" userNameCol="nickname" userCredCol="password"
      userRoleTable="user_roles" roleNameCol="role"/>

1 ответ 1

1

Ошибка

java.sql.SQLException: Access denied for user 'root;password=plemia000'@'localhost'

означает, что у вас вместо 'root' пользователем считается 'root;password=plemia000'. В <Realm ... > замените строку

connectionURL="jdbc:mysql://localhost:3306/coupon_system?user=root;password=plemia000"

на аналогичную, в которой точка с запятой заменена амперсандом, чтобы DNS стал корректным

connectionURL="jdbc:mysql://localhost:3306/coupon_system?user=root&password=plemia000"
1
  • Пошол по твоему совету и получил : Could not load the Tomcat server configuration at \Servers\Tomcat v8.0 Server at localhost-config. The configuration may be corrupt or incomplete. The reference to entity "password" must end with the ';' delimiter. 1 авг 2016 в 18:08

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.