0
I have a website and database running on the same machine. And I use the following connection string:
<add name="cs_name" connectionString="server=227.117.126.60;User Id=DBUser;database=my_main_db; password=t3st#;Convert Zero Datetime=True;SslMode=none" />
I’m pointing to the server IP, but I could color localhost:3306
There is a difference between the two approaches when saying SPEED?
EDIT: personal excuse I wanted to exemplify an IP but ended up getting understood as local IP, the example is just a random IP, I will edit it to get better understanding.
The example is the connection of the application on the same machine as the database only one application calls the localhost and the other the public IP address of the machine itself.
192.168.0.1 and localhost, if indeed they are the same machine, there is no "speed" difference, it is just a translation of the machine address. It’s not gonna change anything at all.
– Filipe L. Constante
Caro @Filipel.Constant do not agree that it is a translation, I believe who solves the address, even if
localhost
or127.0.0.1
is the operating system, independent of graphical interface or network adapters. By logic you could even make notes directly via/etc/hosts
(linux) orc:\windows\system32\etc\hosts
and any address would point to another. Of course the system identifies the interfaces, but it "chooses" what is returned (depending on how it was configured), so I don’t think we can call this "translation"– Guilherme Nascimento
Good, then in this case only resorting to literature or an expert in the area p/ give us a precise north. : ) It is that business, living and learning.
– Filipe L. Constante
@Filipel.Constant yes, I think Bacco understands this, maybe Anderson too, I hope Leonardo expects more answers, I’m just not sure if this is ON-TOPIC, because at first glance it seemed OFF, but I preferred not to vote for the closure, let’s wait for the community ;)
– Guilherme Nascimento
Guys, I edited the question I gave an example that ended up being misunderstood incorrectly.
– Leonardo Bonetti