Home > Back-end >  Eclipse before connecting database error, run a success, the second day running not, why
Eclipse before connecting database error, run a success, the second day running not, why

Time:09-21

Org. Apache. Ibatis. Exceptions. PersistenceException:
# # # Error updating the database. Cause: the mysql. JDBC. Exceptions. Jdbc4. MySQLSyntaxErrorException: Unknown database 'mydb'
# # # Cause: com. Mysql. JDBC. Exceptions. Jdbc4. MySQLSyntaxErrorException: Unknown database 'mydb'
The at org. Apache. Ibatis. Exceptions. ExceptionFactory. WrapException (30) ExceptionFactory. Java:
The at org. Apache. Ibatis. Session. Defaults. DefaultSqlSession. Update (DefaultSqlSession. Java: 200)
The at org. Apache. Ibatis. Session. Defaults. DefaultSqlSession. Insert (185) DefaultSqlSession. Java:
The at org. Fkit. Test. MyBatisTest. Main (MyBatisTest. Java: 27)
Under Caused by: com. Mysql. JDBC. Exceptions. Jdbc4. MySQLSyntaxErrorException: Unknown database 'mydb'
At sun. Reflect. NativeConstructorAccessorImpl. NewInstance0 (Native Method)
At sun. Reflect. NativeConstructorAccessorImpl. NewInstance (Unknown Source)
At sun. Reflect. DelegatingConstructorAccessorImpl. NewInstance (Unknown Source)
The at Java. Lang. Reflect. Constructor. NewInstance (Unknown Source)
At com. Mysql. JDBC. Util. HandleNewInstance (Util. Java: 425)
At com. Mysql. JDBC. Util. GetInstance (Util. Java: 408)
At com. Mysql. JDBC. SQLError. CreateSQLException (SQLError. Java: 943)
At com. Mysql. JDBC. MysqlIO. CheckErrorPacket (MysqlIO. Java: 3973)
At com. Mysql. JDBC. MysqlIO. CheckErrorPacket (MysqlIO. Java: 3909)
At com. Mysql. JDBC. MysqlIO. CheckErrorPacket (MysqlIO. Java: 873)
At com. Mysql. JDBC. MysqlIO. ProceedHandshakeWithPluggableAuthentication (MysqlIO. Java: 1710)
At com. Mysql. JDBC. MysqlIO. DoHandshake (MysqlIO. Java: 1226)
At com. Mysql. JDBC. ConnectionImpl. CoreConnect (ConnectionImpl. Java: 2191)
At com. Mysql. JDBC. ConnectionImpl. ConnectOneTryOnly (ConnectionImpl. Java: 2222)
At com. Mysql. JDBC. ConnectionImpl. CreateNewIO (ConnectionImpl. Java: 2017)
At com. Mysql. JDBC. ConnectionImpl. & lt; init> (ConnectionImpl. Java: 779)
At com. Mysql. JDBC. JDBC4Connection. & lt; init> (JDBC4Connection. Java: 47)
At sun. Reflect. NativeConstructorAccessorImpl. NewInstance0 (Native Method)
At sun. Reflect. NativeConstructorAccessorImpl. NewInstance (Unknown Source)
At sun. Reflect. DelegatingConstructorAccessorImpl. NewInstance (Unknown Source)
The at Java. Lang. Reflect. Constructor. NewInstance (Unknown Source)
At com. Mysql. JDBC. Util. HandleNewInstance (Util. Java: 425)
At com. Mysql. JDBC. ConnectionImpl. GetInstance (ConnectionImpl. Java: 389)
At com. Mysql. JDBC. NonRegisteringDriver. Connect (NonRegisteringDriver. Java: 330)
The at Java. SQL. DriverManager. GetConnection (Unknown Source)
The at Java. SQL. DriverManager. GetConnection (Unknown Source)
The at org. Apache. Ibatis. The datasource. Unpooled. UnpooledDataSource. DoGetConnection (UnpooledDataSource. Java: 201)
The at org. Apache. Ibatis. The datasource. Unpooled. UnpooledDataSource. DoGetConnection (UnpooledDataSource. Java: 196)
The at org. Apache. Ibatis. The datasource. Unpooled. UnpooledDataSource. GetConnection (UnpooledDataSource. Java: 93)
The at org. Apache. Ibatis. The datasource. Pooled. PooledDataSource. PopConnection (PooledDataSource. Java: 404)
The at org. Apache. Ibatis. The datasource. Pooled. PooledDataSource. GetConnection (PooledDataSource. Java: 90)
The at org. Apache. Ibatis. Transaction. JDBC. JdbcTransaction. OpenConnection (JdbcTransaction. Java: 139)
The at org. Apache. Ibatis. Transaction. JDBC. JdbcTransaction. GetConnection (JdbcTransaction. Java: 61)
The at org. Apache. Ibatis. Executor. BaseExecutor. GetConnection (BaseExecutor. Java: 336)
The at org. Apache. Ibatis. Executor. SimpleExecutor. PrepareStatement (SimpleExecutor. Java: 84)
The at org. Apache. Ibatis. Executor. SimpleExecutor. DoUpdate (49) SimpleExecutor. Java:
The at org. Apache. Ibatis. Executor. BaseExecutor. Update (BaseExecutor. Java: 117)
The at org. Apache. Ibatis. Executor. CachingExecutor. Update (CachingExecutor. Java: 76)
The at org. Apache. Ibatis. Session. Defaults. DefaultSqlSession. Update (DefaultSqlSession. Java: 198)
. 2 more

CodePudding user response:

Database name is called mydb

CodePudding user response:

Right, my database is called mydb
  • Related