Более полный вопрос, часть которого было заданно: Часть темы тут!
Попробрвал все варианты, пример:
1.mysql-init.txt - > содержит: UPDATE mysql.user SET Password=PASSWORD('pl00000') WHERE User='root'; FLUSH PRIVILEGES;
2. mysqld --defaults-file="C:\Program Files (x86)\MySQL\MySQL Server5.7\my.ini" --init-file=C:\Users\Maks1988\Desktop\mysql-init.txt
mysqld: [ERROR] Could not open required defaults file: C:\Program Files (x86)\MySQL\MySQL Server 5.7\my.ini mysqld: [ERROR] Fatal error in defaults handling. Program aborted!
3.mysqld GRANT ALL PRIVILEGES ON . TO 'root'@'localhost' IDENTIFIED BY 'pl00000' WITH GRANT OPTION;FLUSH PRIVILEGES; Не помогает!
4.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-01T22:37:56.684944Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2016-08-01T22:37:56.684944Z 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-01T22:37:56.684944Z 0 [Note] mysqld.exe (mysqld 5.7.11) starting as process 2716 ... 2016-08-01T22:37:56.869061Z 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' 2016-08-01T22:37:57.927220Z 0 [Note] InnoDB: Loading buffer pool(s) from C:\Program Files (x86)\MySQL\MySQL Server 5.7\data\ib_buffer_pool mysqld: Table 'mysql.plugin' doesn't exist 2016-08-01T22:37:57.942217Z 0 [Note] InnoDB: Buffer pool(s) load completed at 160802 1:37:57 2016-08-01T22:37:57.951790Z 0 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it. 2016-08-01T22:37:57.968790Z 0 [ERROR] unknown variable 'default-file=my.ini' 2016-08-01T22:37:57.974791Z 0 [ERROR] Aborting
5.mysql.exe --init-file=C:\Users\Maks1988\Desktop\mysql-init.txt
mysql: [ERROR] unknown variable 'init-file=C:\Users\Maks1988\Desktop\mysql-init.txt'
Буду рад любой помоши!
Другой сценарий, та же ошибка (java.sql.SQLException: Access denied for user 'user=root'@'localhost' (using password: YES))
- SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPass');FLUSH PRIVILEGES; Данная строка позволяет изменить пароль, для входа через cmd в mysql, но при попытке подсоединится с таким же паролем через Realm JDBC получаю ошибку! java.sql.SQLException: Access denied for user 'user=root'@'localhost' (using password: YES)
- Скоро застрелюсь! В чём может быть еще проблема ?
<Realm className="org.apache.catalina.realm.JDBCRealm"
driverName="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://localhost:3306/coupon_system"
connectionName="user=root" connectionPassword="password=Maks1988"
userTable="user" userNameCol="nickname" userCredCol="password"
userRoleTable="user_roles" roleNameCol="role"/>
</Realm>