Please note that you can specify the port number with "port = ####", but this port number will be ignored if the host is local. If you want to connect to a local port other than the default, use host = 127.0.0.1 instead of local.
Quote from this page , did anyone check if this is fixed?
It's not a mistake. This is how MySQL is designed. When the host is "localhost", MySQL Unix clients use a Unix socket and not a TCP / IP socket to connect, so the TCP port does not matter.
Link: " 4.2.2 Connecting to a MySQL Server "
PDO, . , psql ( PostgreSQL) localhost, UNIX, 127.0.0.1, TCP , , .
psql
In my humble opinion, you should check the pages associated with the PDO / PHP error.
But I do not think this is a mistake. If you are on a local host, you do not need to specify a port.
Source: https://habr.com/ru/post/1737792/More articles:Testing variable types in Python - variablesDisabling foreign key constraint for all tables does not work - sqlIs it possible to make an unordered list look like CSS? - cssConvert MFC Doc / View to? - linuxhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1737791/sql-rows-to-columns-conversion&usg=ALkJrhiwzN5KAHxlXjx6b2a39JUt-lX7cwCan I develop iPhone apps on Mac without Xcode? - iphoneCreating multiple arrays - javaiPhone: how to launch beta in addition to building the App Store? - iphoneIs the "cache engine" only for PHP? - phpC ++ Win32 Unhandled Exception Handler - c ++All Articles