![]() Here's what the original /etc/hosts file off of the Macintosh looks like in case you ever lost it: Īlso, make sure you have a separate database, user for the database, and folder in the htdocs folder for each website you run on MAMP. Here is the website I use since I forget command-line in order to edit the /etc/hosts file and the steps I presented to you in more detail: ![]() Once you make these changes to the nf file, make sure to reboot your MAMP, as the Apache server needs to take these changes into effect. You then add virtual hosts to the bottom of the file, with code like this, modifying the name examplesite.local to, again, whatever you want the URL to display in the browser: NameVirtualHost *ĭocumentRoot "/Applications/MAMP/htdocs/examplesitename" a database connection wordpress localhost mamperror establishing a database. You save those changes to the /etc/hosts file, then going to the nf in your Apache folder (the location of the file being in Applications/MAMP/conf/apache/nf). WordPress Database Error Duplicate Entry for key PRIMARY for Query INSERT. You can name examplesite.local however you want, this is the URL which will display your website in the browser. # localhost is used to configure the loopback interface You type your new virtual host below that line, the /etc/hosts file looking similar to this: # You shouldn't modify anything beyond the fe80::1%lo0 localhost, as it would mess up the way the hosting is read on your computer. When I delete my created file and run the WP install and put root as both my username and password it says it can’t establish connection, Apache and MySQL servers are both up. I have tried creating my own wp-config file and it throws an error. My wp is installed in windows C: > MAMP > htdocs > clout-inc > all wp unzipped files. ![]() I have multiple websites running on my MAMP machine, and have found it easiest to use the default Apache and MAMP settings.Īnd you don't want to specify MAMP porting in this way through the config-file, instead modifying your /etc/hosts file on your main Macintosh computer. Error Establishing Database Connection (MAMP) vassilkurk.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |