提交 9428d960 编写于 作者: S Serge Rider

MySQL: default user name in connection page

上级 fca69a63
......@@ -27,6 +27,7 @@ public class MySQLConstants {
public static final int DEFAULT_PORT = 3306;
public static final String DEFAULT_HOST = "localhost";
public static final String DEFAULT_USER = "root";
public static final String DRIVER_ID_MYSQL = "mysql5";
public static final String DRIVER_ID_MYSQL8 = "mysql8";
......
......@@ -208,7 +208,11 @@ public class MySQLConnectionPage extends ConnectionPageAbstract implements IComp
dbText.setText(CommonUtils.notEmpty(connectionInfo.getDatabaseName()));
}
if (usernameText != null) {
usernameText.setText(CommonUtils.notEmpty(connectionInfo.getUserName()));
if (!CommonUtils.isEmpty(connectionInfo.getUserName())) {
usernameText.setText(CommonUtils.notEmpty(connectionInfo.getUserName()));
} else if (site.isNew()) {
usernameText.setText(MySQLConstants.DEFAULT_USER);
}
}
if (passwordText != null) {
passwordText.setText(CommonUtils.notEmpty(connectionInfo.getUserPassword()));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册