Tuttavia, MAMP non limitato a questi elementi. Il nome MAMP deriva dai suoi componenti: macOS, Apache, PHP, MySQL o MariaDB, e Perl o Python. You can also specify the connection protocol explicitly, even for localhost, by using the -protocol=TCP option. Introduzione a MAMP (e all’Errore Localhost Refused to Connect) MAMP uno stack di soluzioni composto sia da software open source che proprietario. To ensure that the client makes a TCP/IP connection to the local server, use -host or -h to specify a host name value of 127.0.0.1, or the IP address or name of the local server. This occurs even if a -port or -P option is given to specify a port number. If I run sudo nano /private/etc/hosts it has the following entries (I run my local website on 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost 127.0.0.1 Note I added this myself a long time ago as else the URL. For connections to localhost, MySQL programs attempt to connect to the local server by using a Unix socket file. MAMP Pro 4.2 (latest version) Ports are Apache: 80 and MySQL: 3306. Then return to MAMP and start services again. On Unix, MySQL programs treat the host name localhost specially, in a way that is likely different from what you expect compared to other network-based programs. This is unlikely as you mentioned that MAMP shows Apache status as green, but it could be worth stopping MAMP, opening Terminal and doing sudo apachectl stop, returning to MAMP and changing the ports to 80/3306, then returning to Terminal and doing sudo apachectl restart. MAMP by default doesn't allow TCP connections.Īccording to this answer on Stackoverflow, the easiest solution is to just use localhost instead of 127.0.0.1 as database_host. Unfortunately the Symfony console won't work with the default configuration in parameters.yml like the following: # Database parameters Recently I switched from a custom system setup on my Mac (Apache, MySQL, PHP.
0 Comments
Leave a Reply. |