<?php
$user = substr(md5(rand()),0,16);
$pass = substr(md5(rand()),0,20);
$query = "CREATE USER '{$user}'@'%' IDENTIFIED BY '{$pass}';
GRANT USAGE ON * . * TO '{$user}'@'%' IDENTIFIED BY '{$pass}' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;
CREATE DATABASE IF NOT EXISTS `{$user}`;
GRANT ALL PRIVILEGES ON `{$user}` . * TO '{$user}'@'%';";
mysql_connect("***.****.info", "***", "****") or die(mysql_error());
mysql_query($query) or die(mysql_error());
?>
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GRANT USAGE ON *.* TO '78eb50407b017587'@'%' IDENTIFIED BY '4fa70f7cc25ccf9dc9dd' at line 1.
Anyone know what's going on here
Update I removed identified by and it did nothing. Any other suggestions?