Commit be787b89 authored by Administrator's avatar Administrator

Fixes DB authentication error for MySQL 8.0.4+

The default authentication plugin for MySQL has been changed from
mysql_native_password to caching_sha2_password in version 8.0.4. This
causes that an access failure for the user created in the database
scripts when trying to login from Tomcat.

This commit changes the MySQL database scripts to maintain the
compatibility between Tomcat and MySQL in versions 8.0.4+.
parent 6c30abb1
......@@ -14,7 +14,7 @@ CREATE TABLE `daaexample`.`users` (
PRIMARY KEY (`login`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE USER 'daa'@'localhost' IDENTIFIED BY 'daa';
CREATE USER 'daa'@'localhost' IDENTIFIED WITH mysql_native_password BY 'daa';
GRANT ALL ON `daaexample`.* TO 'daa'@'localhost';
INSERT INTO `daaexample`.`people` (`id`,`name`,`surname`) VALUES (0,'Antón','Pérez');
......
......@@ -14,5 +14,5 @@ CREATE TABLE `daaexample`.`users` (
PRIMARY KEY (`login`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE USER 'daa'@'localhost' IDENTIFIED BY 'daa';
CREATE USER 'daa'@'localhost' IDENTIFIED WITH mysql_native_password BY 'daa';
GRANT ALL ON `daaexample`.* TO 'daa'@'localhost';
......@@ -5,7 +5,7 @@
<groupId>es.uvigo.esei.daa</groupId>
<artifactId>example-full-tests</artifactId>
<packaging>war</packaging>
<version>0.1.15</version>
<version>0.1.16</version>
<name>DAA Example</name>
<licenses>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment