Database name already exists..but it doesn't!

Database name already exists..but it doesn't!

Posted by: biklops
Posted on: 2007-11-05 10:28:00

I just tried to make a new MYSQL Database named "activecollab".

However, when I hit submit it came back with a "this user already has a database named activecollab", which I don't! The only database I have is for my wordpress blog called "blog".

What's going on here?

Re: Database name already exists..but it doesn't!

Posted by: Mousee
Posted on: 2007-11-05 10:50:00

As you're under shared environment, other users on your SQL server probably took that database name already. Hence, you'll need to choose something a little more original to get it to work wink

Re: Database name already exists..but it doesn't!

Posted by: biklops
Posted on: 2007-11-05 10:54:00

And I'm supposed to be a "creative director"! D'oh! Taken car of, thanks!

Re: Database name already exists..but it doesn't!

Posted by: Lensman
Posted on: 2007-11-05 11:00:00

In reply to:

As you're under shared environment, other users on your SQL server probably took that database name already.


There's a global namespace for database names on a MySQL server? Didn't know that!

Re: Database name already exists..but it doesn't!

Posted by: patricktan
Posted on: 2007-11-06 01:19:00

I'm confused.

If I have a unique hostname like "mysql.mydomain.com" and create a database "database", will it collapse with another "database" in "mysql.yourdomain.com"?

Re: Database name already exists..but it doesn't!

Posted by: Mousee
Posted on: 2007-11-06 05:06:00

Consider your domain/hostname to be the same thing as a "Virtual Name". The SQL Server has an IP.. let's say it's 192.168.0.128 (I'm using a local IP as this is just an example). That's the IP your SQL server is on. So when you create the domain/hostname "mysql.mydomain.com", all it's doing is pointing to that IP address of your SQL Server. So you could technically point hundreds if not thousands of sub/domain names at that IP address, but they would all be seen by the SQL Server as the same: An inbound connection attempting to access its resources.

So in the end, it just depends on which SQL Server you're on. The way they have it setup, I presume, is that there are X amount of users per SQL Database. So let's say there are 100 users per database. That means there could be in upwards of 100+ *different* domain names connecting to that SQL Server and thus, 100+ different possibilities of someone taking the name of the database you wanted to create.

Now mind you, my "100+" statistic is completely random and I imagine it may even be overkill, so please keep in mind that it was just used as an example tongue
Hopefully that clears it up a little for you? wink

Re: Database name already exists..but it doesn't!

Posted by: patricktan
Posted on: 2007-11-06 18:14:00

Thanks for the clarification. Mousee

I missed the part that SQL server will point the hostname to an IP address. That is where I am confused.

Thanks for the explanation.

Tags: blogdatabase namemysql databasewordpress