params.put(MySQLDataStoreFactory.HOST.key, host);
params.put(MySQLDataStoreFactory.PORT.key, port);
params.put(MySQLDataStoreFactory.USER.key, user);
params.put(MySQLDataStoreFactory.PASSWD.key, passwd);
params.put(MySQLDataStoreFactory.DATABASE.key, database);
MySQLDataStoreFactory dsFactory = new MySQLDataStoreFactory();
DataStore ds = dsFactory.createDataStore(params);
return ds;
}