• someUser3479

    (@someuser3479)


    Hi,

    I am new to wordpress. I have the following problems:

    1. Even though I checked all names (database name, user password, localhost path etc.),
    in the configuration web interface i always get the message, that database connection could not be established.
    I definitely (!!!!) checked the names enough. There is no mistake.

    Question: Where could I start to find the problem?

    2. After many tries and checks i think i hit the “set default mamp ports” button in mamp. Then I could not start the mamp apache anymore, because i get the warning that another native apache is running on my machine. To get this native one away i put “sudo apachectl stop” into my console, entered my password and hopefully stoppt apache with this. But i still get the error message.

    Question: Where could I start to find the problem?

    Some information about my enviroment/what i did:

    – MAMP PRO (trial, just installed)
    – changed MAMP localhost-folder to sites in my root directory
    – I gave the whole folder and stuff inside read, write and execute rights
    – WordPress unzipped and in my mamp folder (nothing changed)
    – stopped the native apache (hopefully)

    – I created a database (phpmyadmin) and checked the name more than a dozen times
    – I checked the database user in phpmyadmin more than a dozen times
    – I checked the mysql password in mamp more than a dozen times
    – I am able to connect to the configuration page so localhost should also be okay
    – previously i had xamp running. But this program is now not running

    I appreciate any help!

Viewing 13 replies - 1 through 13 (of 13 total)
  • Gadgetroid

    (@gadgetrophy)

    It maybe a server instal problem that error “another native apache is running on my machine.” does not sound good. You need get to get over that before you get to wordpress. What operating system are you using?.

    RossMitchell

    (@rossmitchell)

    I understand that you have checked and re-checked your wp-config.php file, BUT may I draw your attention to a common cause of problems. This is about the type of quotes used, the PHP language requires simple quote characters, either SINGLE QUOTE ‘ or QOUBLE QUOTE “. Depending upon which editor you use, they may substitute quotes which are more pretty and typographically correct.

    If you can correct the quote type, then please do so and try again.

    Otherwise may I ask you to start again with creating your wp-config.php file, using a text editor which is suitable for programs rather than documents, copy and paste the database / username / password fields.

    Thread Starter someUser3479

    (@someuser3479)

    @gadgetroid: OSX 10.9.5
    @rossmitchell: Thank you for that tip. I remember that one time this happened to me. I should have considered this as a source of the error. Probably its not this because I also tried the web Interface:
    ( I tried it first with the conf file. For this I used TextWrangler (checked every name thoroughly. Then I downloaded the wordpress folder again and replaced my renamed config.php with the default config-sample.php . Then I opened the wordpress folder through localhost and tried manyyy times to connect to the database. Always rechecking with phpMyadmin. )

    when I now try to start apache this are the last two lines of the error log:

    [Sat Nov 15 23:45:58 2014] [notice] Apache/2.2.29 (Unix) mod_fastcgi/2.4.6 mod_wsgi/3.4 Python/2.7.8 PHP/5.6.2 mod_ssl/2.2.29 OpenSSL/0.9.8za DAV/2 mod_perl/2.0.8 Perl/v5.20.0 configured — resuming normal operations
    [Sat Nov 15 23:51:47 2014] [notice] caught SIGTERM, shutting down

    Thread Starter someUser3479

    (@someuser3479)

    Update:

    Even though MAMP apache was not running i was able to access localhost.
    Because I also put apachectl stop in my terminal I assumed that the native server is not running.
    So I thought maybe the older XAMP is still running. But the program was completely shut down. Not in my mac bottom bar and also I could not find it in activity monitor with some name like “xamp” or “manager” (thats normally the name for that application).

    Then I started xamp again. And it was probably really starting because I had to put in my computer root password (the program requires this only at start). Somehow the server was still running all the time even the program seemed to be closed.

    So I stopped that and started Mamp again. This seemed to work at first sight but then i tried to visit localhost. My browser said me as response:

    You don’t have permission to access / on this server.

    Mh.. Then I gave my sites folder all rights it could get (wrx) to just get it running, but that didn’t work.

    Question: Why these forbidden message appears?

    RossMitchell

    (@rossmitchell)

    So it looks like you have an apache problem. Lets fix it first.
    We need to get back to the apache html test page, the one which says “It works”

    Can you display https://localhost/
    it should say “It works”

    Can you display https://yourWordpressSite/readme.html
    it will tell you which version you have

    Otherwise remove the changes you have made to the apache config files that you made to connect to your WordPress, then try again. If no luck then reinstall apache

    Once apache is running, make sure that mySQL is running, install phpmyadmin

    Make sure that when you create your database user, that you grant them all priveledges on all databases, it should not be necessary but I suspect this has caused me problems once.

    Thread Starter someUser3479

    (@someuser3479)

    Thank you for the help! Iam not at home. When I come back it will be night here in China. Tomorrow morning I will have tried both!
    Thank y

    Thread Starter someUser3479

    (@someuser3479)

    Access urls:

    – I can not access either of this two urls.

    Change apache file:

    – I never opened an apache config file directly.
    – I never tried to change something about apache except for running apachectl start/stop.
    – the only two programs which I know do something about localhost are xamp and mamp.

    Reinstall apache:;

    – How can I reinstall apache?
    – Are there 3 apache programs? One for xamp, one for mamp and one native? or are xamp/mamp somehow using the native?
    – If they are not using the native, how can I reinstall the mamp one? For the native I would try maybe something like “brew uninstall apache2” and then brew install.
    – Since I do not feel like a pro in this kind of stuff, I better get sure how you think I should do that. I don’t want to destroy my native apache in addition to the mamp-apache.

    Thread Starter someUser3479

    (@someuser3479)

    update:

    – when I press set apache and mysql ports to 80,443 and 3306 in mamp, then I get the access forbidden page.

    – when I press set default mamp ports i couldn’t access localhost.

    Thread Starter someUser3479

    (@someuser3479)

    update:

    https://yourwordpresssite/readme.html is not available

    and

    https://localhost/ is forbidden (403)

    It also seems to be related to Mamp because Xamp-apache works.

    RossMitchell

    (@rossmitchell)

    You need help from someone with “mamp” experience, probably worth asking in the “localhost” support forum here.

    LyleChamney

    (@lylechamney)

    – when I press set default mamp ports i couldn’t access localhost.

    Do you get the MAMP start page when you enter:

    https://localhost:8888

    The above is the localhost address with the default MAMP ports.

    Additionally, the default database user and password for MAMP is root and root .

    I have installed MAMP many times on many Macs using the default, out-of-the-box settings and it just works ??

    Thread Starter someUser3479

    (@someuser3479)

    Question: Can I completely uninstall all mamp stuff without reseting my computer(mac) and without using the uninstaller (because it doesn’t work anymore)?

    After setting default ports and opening “https://localhost:8888” in the browser I get the “You don’t have permission to access / on this server.” page. (Also after new installation)

    further info (if needed):

    Why the new installation may didn’t reset everything:

    I tried to deinstall and install MAMP to get rid of the problem.
    First I deleted the folder, because i read somewehere, that this would be enough.

    Then I installed it again. Then I found there are two Uninstallers. One worked, one not.
    Then I used the working uninstaller to uninstall the just installed one. The other I couldnt uninstall, so I just deleted all folders/files wich include “MAMP“.

    Then I installed again. Seemed to work, because the program gave me the message, that it had to initialize stuff. Somehow the changed root directory of apache (which I changed in the first installation) is still there. So maybe somehow there have been some connections between some old folders and the new installation.

    Also unfortunately the permission error remained the same.

    Question: Can I completely uninstall all mamp stuff without reseting my computer(mac) and without using the uninstaller (because it doesn’t work anymore)?

    Thread Starter someUser3479

    (@someuser3479)

    PS: Thank you for the idea to go to localhost forum. I will ask there soon if I couldn’t figure it out here.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘MAMP WordPress database connection 2Questions’ is closed to new replies.