Wrong user name or password 【28000-199】

idea使用使用h2数据库时

org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is org.h2.jdbc.JdbcSQLInvalidAuthorizationSpecException: Wrong user name or password 【28000-199】

重设h2用户名和密码

Wrong user name or password 【28000-199】

在控制台执行
create user if not exists 用户名 password ‘密码’;
alter user 用户名 admin true;
Wrong user name or password 【28000-199】