MySQL – Improve Connectivity Using Multiple Ports

connectivityMySQL

I have a Ubuntu server with multiple websites, each website connects to its own MySQL database – each of my sites have a number of users accessing/updating the MySQL databases.

Currently all my websites are utilizing the the default MySQL port 3306.

I know I'm able to separate the connection of each website so that is uses its own dedicated port to connect to it's MySQL database.

By doing this will this improve the speed of SQL queries? I'm guessing it will… What are other peoples thoughts on this?

Best Answer

Running MySQL on different ports wont make any difference in the Speed of your queries. What you could do is have a look at your Indexes. If you have a WHERE statement, make sure you have in the following order =, !=, in, < / >, like.

If you use 'where' and your 'like' is before '=' your query will run longer.