Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Issue w- MySQL 5.75 on OSX 10.10 - can't find .mysql_secret 1

Status
Not open for further replies.

admoore

IS-IT--Management
May 17, 2002
224
US
I installed MySQL 5.75 on OSX 10.10 and it is up and running successfully; but, following execution of mysql_install_db I can not locate .mysql_secret anywhere... I double checked the home env variable to make sure as well as searched via spotlight etc... It simpley does not seem to exist; but, the data directory WAS created successfully...

Ideas?

TIA,

-Allen M.
 
Open up terminal.

Type this
Code:
sudo find / -n ".mysql_secret"

Enter your password at the prompt and after a while it should give you the path to the file.

Different installation mechanisms may not use the random-password flag. So you might also try that old fruit of root:root as user:pwd on local installs.
 
Thanks for sudo find suggestion...

Found it at /private/var/root/.mysql_secret but password isn't being accepted for user 'root'@'localhost' (using password: YES)

Re ran mysql_install_db to re-create the data dir and a new random password and it still isn't being accepted...

Not sure what now- restarted daemon and still not accepting root password created in .mysql_secret

Open to ideas...
 
that is most odd as the installation would normally be run as your user and not as root (which is not typically an enabled account on macs)

there are four solutions that come to mind.

Code:
mysql --host=127.0.0.1 --user=root -p
hopefully that should accept the password in the secret file. the difference here is that you are specifying a tcp connection whereas using the localhost keyword causes the client to default to a socket. if there is any possibility of two versions of mysql installed then this could cause confusion.

incidentally running this command
Code:
which mysql
could help diagnose this if you see the mysql being located in an unforeseen folder.

the second solution is to rerun the install_db script and suppress the password generation. to do this add the --insecure option to the install statement. or specify where the random password should be written
Code:
--random-password-file=/Users/myUser/Desktop/myRandomMysqlPassword.txt

the third is to reset the password

Code:
sudo su
killall mysqld
mysqld --skip-grant-tables --skip-networking
mysql
//from the mysql prompt
UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
FLUSH PRIVILEGES
exit;
//from the terminal
killall mysqld

then restart mysql in the way you normally would (without the security bypasses).

4. uninstall mysql and reinstall it through MAMP. I've been using MAMP for years and not once has it given me any strife.


 
mysqld --skip-grant-tables --skip-networking doesn't seem to work with MySQL 5.75 and doubt it's available w- MAMP. Will probably try to re-install. I need 5.75 for the new GIS functions...
 
reinstalling it fixed it... but for successful install you must un-check the create startup item option with OSX 10.10
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top