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
$app->log('Unable to connect to the database'.mysql_error($link),LOGLEVEL_ERROR);
69
+
return;
69
70
}
70
71
71
72
//* Create the new database
72
-
if (mysql_create_db($data["new"]["database_name"]),$link) {
73
+
if (mysql_query('CREATE DATABASE '.addslashes($data["new"]["database_name"]),$link)) {
73
74
$app->log('Created MySQL database: '.$data["new"]["database_name"],LOGLEVEL_DEBUG);
74
75
} else {
75
76
$app->log('Unable to connect to the database'.mysql_error($link),LOGLEVEL_ERROR);
@@ -82,7 +83,8 @@ function db_insert($event_name,$data) {
82
83
$db_host = 'localhost';
83
84
}
84
85
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);
86
+
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);
87
+
//echo "GRANT ALL ON ".addslashes($data["new"]["database_name"]).".* TO '".addslashes($data["new"]["database_user"])."'@'$db_host' IDENTIFIED BY '".addslashes($data["new"]["database_password"])."';";
86
88
87
89
mysql_query("FLUSH PRIVILEGES;",$link);
88
90
mysql_close($link);
@@ -95,6 +97,7 @@ function db_update($event_name,$data) {
0 commit comments