| | |
| | | import java.sql.PreparedStatement; |
| | | import java.sql.SQLException; |
| | | |
| | | import static org.springblade.common.constant.FtpConstant.localPath; |
| | | import static org.springblade.common.constant.FtpConstant.sql_connect_dev; |
| | | import static org.springblade.common.config.FtpConfig.localPath; |
| | | import static org.springblade.common.config.FtpConfig.sqlConnect; |
| | | |
| | | public class MysqlCenlint { |
| | | |
| | |
| | | int ColumnCount; |
| | | //int RowCount; |
| | | String driver = "com.mysql.cj.jdbc.Driver"; |
| | | String url = sql_connect_dev; //换成要连接的数据库信息 |
| | | String url = sqlConnect; //换成要连接的数据库信息 |
| | | String user = "root"; |
| | | String password = "zhba0728"; |
| | | Class.forName ( driver ); |
| | |
| | | if (!conn.isClosed ()) { |
| | | System.out.println ( "数据库连接成功:" ); |
| | | String sqls = sql; //sql |
| | | System.out.println("sqls = " + sqls); |
| | | PreparedStatement ps = conn.prepareStatement ( sqls ); |
| | | boolean execute = ps.execute(); |
| | | ps.close (); |
| | |
| | | int ColumnCount; |
| | | //int RowCount; |
| | | String driver = "com.mysql.cj.jdbc.Driver"; |
| | | String url = sql_connect_dev; //换成要连接的数据库信息 |
| | | String url = sqlConnect; //换成要连接的数据库信息 |
| | | String user = "root"; |
| | | String password = "zhba0728"; |
| | | Class.forName ( driver ); |
| | |
| | | int ColumnCount; |
| | | //int RowCount; |
| | | String driver = "com.mysql.cj.jdbc.Driver"; |
| | | String url = sql_connect_dev; //换成要连接的数据库信息 |
| | | String url = sqlConnect; //换成要连接的数据库信息 |
| | | String user = "root"; |
| | | String password = "zhba0728"; |
| | | Class.forName ( driver ); |