Leca Posted April 2, 2014 Share Posted April 2, 2014 I followed the steps outlined in the book and on www.mysql.com site, but i was unable to find the MySQL folder on my mac, it doesn't have neither the usr folder or local folder. Maybe I should have created them before the installation? How do I uninstall MySQL from my mac? My MySQL is running, but I can't access the MySQL file because I don't know where is it. Maybe I'm not using the terminal correctly? I don't have practice in command line. Thanks Leca Link to comment Share on other sites More sharing options...
Antonio Conte Posted April 2, 2014 Share Posted April 2, 2014 Those folders are hidden on your computer. To be able to see them, you need to run the following commands: defaults write com.apple.finder AppleShowAllFiles -boolean true killall Finder If you want to hide them again (you shouldn't need to) run these commands: defaults delete com.apple.finder AppleShowAllFiles killall Finder When that is done, you should be able to find them both using Finder and the command line. The easiest way to move using the command line is to do it small steps. Use "cd .." to go back a directory, "ls -laG" to show it's content and "cd {DIRECTORY}" to go into a folder. This is much simpler than writing the fulls paths until you get used to it. Next, you want to do something called simlinking or moving the binaries to execute them without the directory path. The easiest way to do this, in my opinion, is to create a .bashrc file. This file should be placed in your user directory to influence your user. Use this command (or open it using finder - this is a hidden file, so do step one first) to open the file in textmate: textmate ~/.bashrc In that file, you can create several aliases for convenience. With the following lines, you should be able to use mysql and mysqliadmin without the full path to it. You can do the same with PHP, Sublime or anything else you want. alias mysql=/usr/local/mysql/bin/mysql alias mysqladmin=/usr/local/mysql/bin/mysqladmin # Add your own here. Google for more info Hope that helps you out. The command line is pretty easy, but you need to be familiar with the basics. You can also use the .bashrc file to enable colors, etc. PS: Keep in mind you need to close and reopen the command line for changes in .bashrc to take effect. PPS: I'm not on my MAC now, so I haven't tested any of this. Ask if you have any questions or google if you get any error messages. 1 Link to comment Share on other sites More sharing options...
Leca Posted April 3, 2014 Author Share Posted April 3, 2014 Thanks for your reply, i will try it. Link to comment Share on other sites More sharing options...
Leca Posted April 7, 2014 Author Share Posted April 7, 2014 Antonio, i tried step one, but the terminal says: defaults[15448:507] Unexpected argument killall; leaving defaults unchanged. Could you help me, again? Thanks Link to comment Share on other sites More sharing options...
Antonio Conte Posted April 7, 2014 Share Posted April 7, 2014 I think that command was changed between some of the OSX updates. Try searching google for "view hidden files OSX {YOUR-VERSION}". It shouldn't be hard to find. Dump the thread if you need any more help. Link to comment Share on other sites More sharing options...
Larry Posted April 7, 2014 Share Posted April 7, 2014 You can also get to hidden folders by... Finder > Go > Go to Folder and entering the folder's name in the prompt (e.g., ~/Library or /usr/local/mysql) or By using the Terminal app: open ~/Library or open /usr/local/mysql Although I do sometimes open hidden folders in the Finder, you generally want to avoid doing anything this way as you'll quickly hit permissions issues. Also, one ought to learn how to navigate using the Terminal. Link to comment Share on other sites More sharing options...
Antonio Conte Posted April 7, 2014 Share Posted April 7, 2014 My trick for permission problems (needing to be root user) is prefacing commands with sudo and entering my password. Is there a better way I don't know about? The reason why I like seeing hidden files is it makes the two-step folder-by-folder navigation I talked about in my first post a lot easier. There's no need to be a command line ninja if you can learn the folder structure an easier way. Link to comment Share on other sites More sharing options...
Larry Posted April 7, 2014 Share Posted April 7, 2014 No, no that would do for handling the permissions changes. And if you copy things in the Finder where permission is denied, you'll be prompted to the same effect. But I've seen things get wonky this way, too. Link to comment Share on other sites More sharing options...
Leca Posted April 9, 2014 Author Share Posted April 9, 2014 I find this on mac forums, defaults write com.apple.finder AppleShowAllFiles 1 && killAll Finder. That works fine. Thanks 1 Link to comment Share on other sites More sharing options...
Antonio Conte Posted April 9, 2014 Share Posted April 9, 2014 No problem. Nice find. You got the rest sorted? Link to comment Share on other sites More sharing options...
Leca Posted April 9, 2014 Author Share Posted April 9, 2014 Not yet, the step 2 didn't work, maybe I still have to search more about terminal commands. I gave a help command on terminal, and confess that I found confusing, but I'll try more on the net. Thanks Link to comment Share on other sites More sharing options...
Antonio Conte Posted April 9, 2014 Share Posted April 9, 2014 If the file doesn't exists, you might have to create it first. Try running the following to create it: touch ~/.bashrc or just cd into the location to make sure the file's there. cd ~ ls -laG If that command still doesn't work, textmate isn't available as a command. You can try nano or just find the file in finder and open it however you like. Link to comment Share on other sites More sharing options...
Recommended Posts