Hi everyone, I'm new to Drupal as well as using the terminal and I hope to get some help.

Initially I've encountered issues that I couldn't change the password for mysql (root/root). I followed the instructions in the MAMP faq but all I got was this message:

/Applications/MAMP/Library/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)'

Check that mysqld is running and that the socket: '/var/mysql/mysql.sock' exists!

It is a similar issue I found in this thread: http://drupal.org/node/270373 so I tried one of the method found within this thread that is:

1. Stop MAMP. (This step might be unnecessary... but why take chances?)

2. $ sudo rm /var/mysql/mysql.sock. This removes the incorrectly symlinked mysql.sock file.

3. Start MAMP. (This step might also be unnecessary, but the target mysql.sock file doesn't exist unless MySQL is running.)

4. sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /var/mysql/mysql.sock. This sets up the symlink correctly.

5. Restart MAMP.

Now whenever I open MAMP start page I get this error: "Error: Could not connect to MySQL server!"

and MAMP itself will have this prompt:
/Applications/MAMP/Library/bin/mysqlcheck: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect

How can I resolve this?? Previously I do have mysql installed and that was way before I installed Drupal. How can I remove my previous sql??

Comments

Road Runner’s picture

I would delete MAMP and reinstall it. There is no need to change passwords from user=root and password=root on your local machine. Why introduce another variable.

Reinstall MAMP, use phpmyadmin to create database. Install Drupal make sure you duplicate default.settings.php and then rename one copy to settings.php

The whole point of MAMP is to reduce problems and make it easy to delete and start over too.

d8nnii’s picture

Hi, I guess you are right. But that means all my config for Drupal will be gone?