whats the total number of ys in:
q: are there any pitfalls with having multiple mysql databases on 1 server node? i want to prepare my database for sharding in the future. but right now i only need 1 node.
what id like to do is to shard the database into virtual shards, say 12 shards, and put all of them onto the same server node for now.
and when i need to scale out, i could just then get a 2nd server and move 6 of the 12 virtual shard onto the new machines.
are there any pitfalls with having 12 different databases on 1 machine?


*

*can i still run only 1 mysql instance to support those 12 databases?

*does having 12 databases result in higher memory usage?

*does this require having 12x as many database connections?

*any other pitfalls?


thanks.

a: nothing wrong at all. there might be a slight overhead in memory usage, but if you are in a situation where you have to consider sharding, then memory should not be your main problem anyway.
your applications can use a connection pool. most mysql connectors support this mode, and it lets the pool manager decide on the most efficient way to handle the requests. in theory, they could also use one and the same connection (and issue use db_name to change databases), but that can get really confusing for the developers.

user
The total number of "y"s in that passage is twenty-four.
assistant