brian914 Posted June 15, 2008 Share Posted June 15, 2008 So I am trying to follow this tutorial on Lynda.com and at some point I must have taken a wrong turn. I have everything installed on my machine and was in the process of configuring my MySQL via the Terminal. Somehow it can't find the mySQL and I am too new to the topic to even trouble shoot this situation. I am hoping that if I explain what I did, it will be clear to someone more knowledgeable where I went wrong and how to fix it. Here is what I have on my computer now: OS X 10.4.11 Intel Server version: Apache/1.3.41 (Darwin) PHP 5.2.4 /usr/local/mysql/bin/mysql Ver 14.12 Distrib 5.0.51b, for apple-darwin8.11.1 (i686) using readline 5.0 I was told to type the following: My-Computer-1:~ brian$ echo 'export PATH=$PATH:/user/local/mysql/bin' >> ~/.bash_profile Then the following: My-Computer-1:~ brian$ cat .bash_profile Which gives me this, which I know is wrong, as I should just get that line once: export PATH=$PATH:/user/local/mysql/bin/ export PATH=$PATH:/user/local/mysql/bin export PATH=$PATH:/user/local/mysql/bin export PATH=$PATH:/user/local/mysql/bin My-Computer-1:~ brian$ Then when I type this: My-Computer-1:~ brian$ which mysql no mysql in /bin /sbin /usr/bin /usr/sbin /user/local/mysql/bin/ /user/local/mysql/bin /user/local/mysql/bin /user/local/mysql/bin My-Computer-1:~ brian$ So it can't find the mySQL, right? When I installed it, I just followed the default settings, as far as I know. How do I fix this. Thanks a lot for help with this! Quote Link to comment Share on other sites More sharing options...
trq Posted June 15, 2008 Share Posted June 15, 2008 You'll need to logout and then back in for your changes to ~/.bash_profile to take effect. Do so and then check your path using.... echo $PATH What does that output? Quote Link to comment Share on other sites More sharing options...
brian914 Posted June 17, 2008 Author Share Posted June 17, 2008 I quick the terminal, does that qualify as logging out? I did that and got this: /bin:/sbin:/usr/bin:/usr/sbin:/user/local/mysql/bin/:/user/local/mysql/bin:/user/local/mysql/bin:/user/local/mysql/bin Thank you so much for the help! Quote Link to comment Share on other sites More sharing options...
trq Posted June 17, 2008 Share Posted June 17, 2008 Firstly, your ~/.bash_profile file is foo bar'd. You need to (or should at least) remove all of the export PATH=$PATH:/user/local/mysql/bin lines and replace them with one... export PATH=$PATH:/usr/local/mysql/bin Notice its /usr not /user also note there is no trailing forward slash. Quote Link to comment Share on other sites More sharing options...
brian914 Posted June 17, 2008 Author Share Posted June 17, 2008 Thank you so much for the help. Like I said, I am completely new to this, so bear with me. What does foo bar'd mean? How do I remove them? I don't know the command line at all... Thank you! Brian Quote Link to comment Share on other sites More sharing options...
trq Posted June 17, 2008 Share Posted June 17, 2008 What does foo bar'd mean? Hehe, sorry. Thats my way of saying broken. How do I remove them? I don't know the command line at all... You can simply open your ~/.bash_profile file in a text editor and edit the file accordingly. Or, this will fix it in one go from the command line. sed -i -e '/mysql/d' ~/.bash_profile ; echo 'export PATH=$PATH:/usr/local/mysql/bin' >> ~/.bash_profile Quote Link to comment Share on other sites More sharing options...
brian914 Posted June 18, 2008 Author Share Posted June 18, 2008 I did this, so it seems nothing has changed. My-Computer-1:~ brian$ sed -i -e '/mysql/d' ~/.bash_profile ; echo 'export PATH=$PATH:/usr/local/mysql/bin' >> ~/.bash_profile My-Computer-1:~ brian$ which mysql no mysql in /bin /sbin /usr/bin /usr/sbin /user/local/mysql/bin/ /user/local/mysql/bin /user/local/mysql/bin /user/local/mysql/bin My-Computer-1:~ brian$ Quote Link to comment Share on other sites More sharing options...
trq Posted June 18, 2008 Share Posted June 18, 2008 You need to logout and back in for your new .bash_profile to take effect. Either that or you need to source the file. eg; source ~/.bash_profile Id'e recommend loging out and back in though, as there may be other environemt variables set somewhere else. Quote Link to comment Share on other sites More sharing options...
brian914 Posted June 18, 2008 Author Share Posted June 18, 2008 I just did this: My-Computer-1:~ brian$ which mysql /usr/local/mysql/bin/mysql My-Computer-1:~ brian$ So that means it is doing what I have been trying to make it do, right? So excited. Thank you so much for your help!!!! 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.