我面臨錯誤,org.postgresql.util.PSQLException: FATAL: 數據庫“”不存在Java代碼部署在AWS lambda中以連接RDS中運行的postgres數據庫。代碼String jdbcUrl = "jdbc:postgresql://database-1.cfgz85wxhk0z.eu-west-1.rds.amazonaws.com:5432/postgres";Connection connection = null;try { connection = DriverManager.getConnection(jdbcUrl, "database_name", "Password"); Statement st = connection.createStatement(); st.execute("select * from <schema>.employee;");} catch (SQLException e) { e.printStackTrace();} catch(Exception e) { e.printStackTrace();}
添加回答
舉報
0/150
提交
取消