我面临错误,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
提交
取消