virtual Posted January 8, 2009 Report Share Posted January 8, 2009 I previously had PHP and MySql set up on my Mac, but after changing computers, transfering the whole hard drive to the new computer and updating to Leopard, the computer refused to connect to localhost. After hours with Mac support, they informed me that the upgrade to Leopard had probably corrupted something and to try MAMP. So I have set up MAMP but want to change the MySql root password, however when I type mysql -u root in Terminal I get the following reply -bash: mysql: command not found I guess this is because it is looking for the original mysql not the MAMP version. I am a total programming noob, but I have looked all over the internet to find how to access this version. Most of the replies are written in gobbledy gook, and I am scared to try start entering just anything into Terminal without comprehending what I'm doing. Could some kind person here please tell me exactly what I need to type to access this and set a new password. Thanks in advance for your help Quote Link to comment Share on other sites More sharing options...
virtual Posted January 8, 2009 Author Report Share Posted January 8, 2009 I think that I need to change my default path in .profile, to access the MAMP MySql, for the moment it is export PATH="$PATH:/usr/local/mysql/bin" Should I change this to $link = mysql_connect('localhost', 'root', 'root'); Please help Quote Link to comment Share on other sites More sharing options...
falkencreative Posted January 8, 2009 Report Share Posted January 8, 2009 As far as I know, you shouldn't need to mess with the terminal at all... I've never needed to. -- install MAMP -- run MAMP.app -- When MAMP.app starts, make sure that the servers are running correctly, and click "open start page". That will give you the localhost address you need to work with MAMP (and it will show you what username/password is currently active for accessing mysql) -- your mysql username and password can be changed by using phpMyAdmin and changing the settings under "Privileges" Quote Link to comment Share on other sites More sharing options...
virtual Posted January 9, 2009 Author Report Share Posted January 9, 2009 OK, thanks for the info. This was the way I had to set up the previous installation, but that was a couple of years ago. Quote Link to comment Share on other sites More sharing options...
virtual Posted January 13, 2009 Author Report Share Posted January 13, 2009 Help again, I changed my Mysql password in PHPmyadmin a couple of days ago. Today I tried testing a site and that was fine, then I tried to go to the MAMP start page to get into PHPmy admin and got this error Error: Could not connect to MySQL server! This is the address the start page showed: http://localhost/MAMP/?language=English What did I do wrong???? Quote Link to comment Share on other sites More sharing options...
virtual Posted January 14, 2009 Author Report Share Posted January 14, 2009 Can anyone help me here??? Quote Link to comment Share on other sites More sharing options...
falkencreative Posted January 14, 2009 Report Share Posted January 14, 2009 "Hi,I just installed MAMP, and got the same error. Then I checked the index.php file under the /MAMP/bin/mamp/ folder, and found that it hard code the msyql connection username/password as root/root. If you changed the default root password (of course for security), you can modify the code in index.php to test MAMP. It worked for me. good luck," http://forum.webedition.de/phpBB/viewtopic.php?t=115 This may be the source of your problem... Looks like you may need to open that index.php file in your code editor and make sure that it is using the correct username/password details. If that doesn't work for you, check the link above, since it includes other fixes for this issue. Or check this as well: http://twob.net/journal/fix-for-mamp-mysql/ Quote Link to comment Share on other sites More sharing options...
virtual Posted January 14, 2009 Author Report Share Posted January 14, 2009 Fabulous, the first option worked, it was hard coded into the index.php. Thank you so much for helping me out. Quote Link to comment Share on other sites More sharing options...
falkencreative Posted January 15, 2009 Report Share Posted January 15, 2009 Fabulous, the first option worked, it was hard coded into the index.php. Thank you so much for helping me out. Great. Glad to help. I'll keep this issue in mind in case others run into it. Most people don't usually change their username/password on their local install of MySQL since security is less of a problem than on a live server, but it may come in handy. Quote Link to comment Share on other sites More sharing options...
Guest stefan Posted August 29, 2009 Report Share Posted August 29, 2009 hey there! i've got exactly the same problem as above. i can't access mysql server through mamp anymore after i have changed the root password. i changed my password already pack to root and made sure that it is still under root in the phpmyadmin file. but it gives me still an error msg. the link above the helped 'virtual' out is death. is there another link i can follow? cheers stefan Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.