WordPress.org

Ready to get started?Download WordPress

Forums

MAMP woes: Can't dump database. Access Denied. Cannot Connect through Socket. (3 posts)

  1. awinnell
    Member
    Posted 2 years ago #

    My WordPress site is complete and ready to take live. I've been developing it locally using MAMP (on my Mac running 10.7.4). For some unknown reason, I am unable to access phpMyAdmin, or even connect to the site. I've been receiving the "#1045 - Access denied for user 'root'@'localhost' (using password: NO)" error. I have not changed any passwords.

    All I really need is a dump of the database so I can import it into phpMyAdmin on my live server (which I can access).

    I've tried accessing mysql through Terminal. I'm attempting to reset the root user password (which I think is the problem, but I could be wrong).

    I've used the terminal command:
    /Applications/MAMP/Library/bin/mysqld_safe --skip-grant-tables --skip-networking to start the mysqld daemon, which returns mysqld_safe Starting mysqld daemon with databases from /Applications/MAMP/db/mysql

    From here, things go down hill.

    When I attempt to run mysql mysql -uroot so I can log in and make changes to the database, I get ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2)

    I'm banging my head against my keyboard at the moment. I can't do a dump of the database because root@localhost doesn't have permissions, and I can't change permissions for some reason. Anyone have any ideas?

  2. joffcom
    Member
    Posted 2 years ago #

    I would reset the root password then try again.
    http://forum.mamp.info/viewtopic.php?f=2&t=1719&start=30#p27139

  3. awinnell
    Member
    Posted 2 years ago #

    That's the rub. I've been trying to reset the root password for hours.

    When I run:

    /Applications/MAMP/Library/bin/mysqladmin -u root -p password NEWPASSWORD

    I get this:

    ./mysqladmin: connect to server at 'localhost' failed
    error: 'Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2)'
    Check that mysqld is running and that the socket: '/Applications/MAMP/tmp/mysql/mysql.sock' exists!

Topic Closed

This topic has been closed to new replies.

About this Topic