New database: Your username contains invalid characters

shaman

Verified User
Joined
Sep 9, 2010
Messages
22
I no longer am able of creating MySQL databases or users with underscore (_) in their name. This is what i get:

Error creating the database
Details
Your username contains invalid characters. (_)


Same goes for database name.
 
Script doesn't check correct

Hi there,

the jscript that checks if characters are allowed, allows underscores but it actually doesn't...

Code:
function nameOK(name)
{
	var ch;
	var i;

	if (name.length < 3) return false;
	if (name.length > 14) return false;

	for (i=0; i<name.length; i++)
	{
		ch=name.charAt(i);
		if ( i==0 && !((ch >= 'a' && ch <= 'z') || (ch >= '0' && ch <= '9')) || ch==' ' ) return false;
		else if (!((ch >= 'a' && ch <= 'z') || (ch >= '0' && ch <= '9') || (ch=='_') || (ch=='-')) || ch==' ') return false;
	}

	return true;
}
 
Back
Top