Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to learn PHP and I'm just in the process of installing apache,msql and PHP.

I'm on a mac osx 10.7.2

I downloaded: mysql-5.5.18-osx10.6-x86_64.dmg

I'm now at the point of setting the root password and when I type in: sudo: mysql_secure_installation it asks me to enter my password, then it says:

sudo: mysql_secure_installation: command not found

Any help would be appreciated.

share|improve this question

migrated from stackoverflow.com Dec 2 '11 at 22:07

This question came from our site for professional and enthusiast programmers.

    
@Cfreak, it's not a command, but it is a program - mysql-secure-installation –  Jason McCreary Dec 2 '11 at 21:12
    
@JasonMcCreary you're right. I'm used to dealing with it on Linux. It's probably a path problem as you pointed out –  Cfreak Dec 2 '11 at 21:14
    
You should take a look at the documentation on installing MySQL 5.5 on Mac OS X –  ub3rst4r Jan 4 at 20:36

2 Answers 2

This should work:

cd /usr/local/mysql
sudo bin/mysql_secure_installation

As the error message Can't find a 'mysql' client in PATH or ./bin says, mysql_secure_installation is looking for a mysql client in your PATH or ./bin directory - so if you want it to find /usr/local/mysql/bin/mysql, it should be started from /usr/local/mysql.

share|improve this answer

Your PATH is probably not updated since you used the DMG. As such you will need to run this with the full path or modify your PATH to include.

Probably something like:

/usr/local/mysql/bin/mysql_secure_installation

I assume you've followed the Reference Manual

share|improve this answer
    
Thanks for your help Jason, I just tried that and got a similar message: -bash: /usr/bin/mysql/mysql_secure_installation: No such file or directory –  Craig Dec 2 '11 at 21:13
    
I'm not sure the exact path, been a while and I'm not on my Mac at the moment. See update. –  Jason McCreary Dec 2 '11 at 21:15
    
You can use the locate command to try and find it. Or do an exhaustive search find / | grep mysql_secure_installation. You may also want to check into the macports version. That is what I run on my machine and it was really easy to setup. –  Tim Dec 2 '11 at 21:23
    
Hi Tim, thanks I tried the find / | grep method and it returned: /usr/local/mysql-5.5.18-osx10.6-x86_64/bin/mysql_secure_installation , so I tried it and got the following: sudo /usr/local/mysql-5.5.18-osx10.6-x86_64/bin/mysql_secure_installation Password: Can't find a 'mysql' client in PATH or ./bin --- Does this mean anything to you? –  Craig Dec 2 '11 at 21:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.