List of usage examples for io.vertx.mysqlclient MySQLConnection changeUser
@Fluent MySQLConnection changeUser(MySQLAuthOptions options, Handler<AsyncResult<Void>> handler);
From source file:examples.MySQLClientExamples.java
public void changeUserExample(MySQLConnection connection) { MySQLAuthOptions authenticationOptions = new MySQLAuthOptions().setUser("newuser") .setPassword("newpassword").setDatabase("newdatabase"); connection.changeUser(authenticationOptions, ar -> { if (ar.succeeded()) { System.out.println("User of current connection has been changed."); } else {//w w w .j ava 2 s .c o m System.out.println("Failure: " + ar.cause().getMessage()); } }); }