You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: interface/web/sites/lib/lang/en_database.lng
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -16,4 +16,5 @@ $wb["database_user_error_empty"] = 'Database user is empty.';
16
16
$wb["database_user_error_unique"] = 'There is already a database user with this name on the server. To get a unique name, e.g. prepend your domain name to the username.';
17
17
$wb["database_user_error_regex"] = 'Invalid database user name. The username may contain these characters: a-z, A-Z, 0-9 and the underscore. Length: 2 - 64 characters.';
18
18
$wb["limit_database_txt"] = 'The max. number of databases is reached.';
19
+
$wb["database_name_change_txt"] = 'The database name can not be changed';
$app->log('Unable to connect to the database'.mysql_error($link),LOGLEVEL_ERROR);
69
+
}
70
+
71
+
//* Create the new database
72
+
if (mysql_create_db($data["new"]["database_name"]),$link) {
73
+
$app->log('Created MySQL database: '.$data["new"]["database_name"],LOGLEVEL_DEBUG);
74
+
} else {
75
+
$app->log('Unable to connect to the database'.mysql_error($link),LOGLEVEL_ERROR);
76
+
}
77
+
78
+
// Create the database user
79
+
if($data["new"]["remote_access"] == 'y') {
80
+
$db_host = '%';
81
+
} else {
82
+
$db_host = 'localhost';
83
+
}
84
+
85
+
mysql_query("GRANT ALL ON ".addslashes($data["new"]["database_name"])." TO '".addslashes($data["new"]["database_user"])."'@'$db_host' IDENTIFIED BY '".addslashes($data["new"]["database_password"])."';",$link);
0 commit comments