If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Path has a typo - how can I correct it ?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-24-11, 19:32
dufus dufus is offline
Registered User
 
Join Date: Mar 2011
Posts: 5
Path has a typo - how can I correct it ?

I am new at mysql so please forgive my ignorance.
I have downloaded the sql (64 bit) for my Mac book pro

When I type in the terminal " mysql --version" I get the following "-bash: mysql: command not found"

Also in the line below you will notice that I have a typo. I have mysqul instead of mysql. There should not be a "u" in there.
"/usr/local/bin:/usr/local/sbin:/usr/local/mysqul/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

My Macbook Pro has the following hardware info:
Hardware Overview:

Model Name: MacBook Pro
Model Identifier: MacBookPro3,1
Processor Name: Intel Core 2 Duo
Processor Speed: 2.2 GHz
Number Of Processors: 1
Total Number Of Cores: 2
L2 Cache: 4 MB
Memory: 2 GB
Bus Speed: 800 MHz
Boot ROM Version: MBP31.0070.B07
SMC Version (system): 1.16f11
Serial Number (system): W872421NX91
Hardware UUID: 00000000-0000-1000-8000-001EC210E319
Sudden Motion Sensor:
State: Enabled


So I downloaded the following version : for Mac OS X – Mac OS X ver. 10.6 (x86, 64-bit,
(mysql-5.5.10-osx10.6-x86_64.dmg)

When I go under System Preferences on my Mac I see MySQL and it is green and running – It says The MySQL server instance is running

I am trying to follow some learning exercise but cannot go any further. Where did I go wrong ?

Any help would be appreciated.
Thanks.
Dufus
Reply With Quote
  #2 (permalink)  
Old 03-24-11, 19:50
it-iss.com it-iss.com is offline
Registered User
 
Join Date: Sep 2009
Location: San Sebastian, Spain
Posts: 623
Hi,

when you say there is a typo in the following line:

"/usr/local/bin:/usr/local/sbin:/usr/local/mysqul/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin"

Do you mean in your path setting? Have you tried changing the path setting in your environment first? That is to say from Terminal do the following:

$ export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin"

and then try mysql --version again.

If this works you will need to execute

$ sudo bash
Password:

# vi /etc/profile

And change in there the path setting.
__________________
Ronan Cashell
Senior Oracle/MySQL DBA
http://www.it-iss.com
Reply With Quote
  #3 (permalink)  
Old 03-24-11, 20:38
dufus dufus is offline
Registered User
 
Join Date: Mar 2011
Posts: 5
echo $PATH

umm I am not sure really. This is how little I know.

when I type
my-name-computer:~ myname$ echo $PATH

I get the following:

/usr/local/bin:/usr/local/sbin:/usr/local/mysqul/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
my-name-computer:~ myname$ mysql --version
my-name-computer:~ myname$

This is how I noticed there is an U in there.

I am not sure if this is the reason I dont get a version.


Thanks for the reply
Reply With Quote
  #4 (permalink)  
Old 03-24-11, 21:27
dufus dufus is offline
Registered User
 
Join Date: Mar 2011
Posts: 5
mysql still not found

I have tried typing the following:

$ export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin"


But I still get the following:
-bash: $: command not found

Thanks. Dufus
Reply With Quote
  #5 (permalink)  
Old 03-24-11, 22:08
dufus dufus is offline
Registered User
 
Join Date: Mar 2011
Posts: 5
Permission denied

I went back into my lesson and type in as instructed

export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"

then I hit Ctrl-X to exit - Yes to save and pressed enter for the file name

Then I get an error message [ Error writing .bash_profile_: Permission denied ]


Does this means anything to anyone of you ?

Thanks.

dufus
Reply With Quote
  #6 (permalink)  
Old 03-25-11, 03:42
it-iss.com it-iss.com is offline
Registered User
 
Join Date: Sep 2009
Location: San Sebastian, Spain
Posts: 623
Hi,

I think we need to go back a step to first see where MySQL has been installed. In Terminal can you go and look in /usr/local directory to see what the name of the mysql directory is? I think it is /usr/local/mysqlu judging by the fact that after executing mysql --version you did not get command not found error. But it is better to confirm this before we continue.
__________________
Ronan Cashell
Senior Oracle/MySQL DBA
http://www.it-iss.com
Reply With Quote
  #7 (permalink)  
Old 03-25-11, 04:29
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,262
if you are unsure of what you are doing with operating systems then If I were you I'd uninstall MySQL, I'd then download a copy of XAMPP and let that install, granted you will get stuff you don't neccesariloy want or need but the potentailly tricky part of the installation is dealt with on your behalf.

if you are getting "permission denied" messages it means the user account you are logged on with has insufficient permissions to write/overwrite that file.. either you need to logon using the administrator account and make chanegs as required or find out how you temporarily give your account admin permission. as to how you do that I dunno, I don't use Apple stuff. in an ideal world all users shoul;d run on th elowest permissions they need, retain an admin accouint for system maintenance on the odd occasion when you need to do sysadmin stuff as it reduces the risks of rogue code trashing the system.
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #8 (permalink)  
Old 03-25-11, 09:11
dufus dufus is offline
Registered User
 
Join Date: Mar 2011
Posts: 5
What I have done so far

Thank you for both replies.

I am following a course and I went back to the beginning. I will post everything I did.

I am wondering if it is because my Macbook Pro is old but it does say Intel Core 2 Duo so I think I installed the right MySQL

Next Chapter I will be installing Ruby on Rails on Windows I may have more luck.

One thing is that my name on the terminal comes out like so
first-lasts-computer:~ firstlast$

The instructor has
kevin only which is much easier - I am wondering where I can change my computer name and if it would mess things up ?
I don't mind reinstalling everything but I do not know how.

Thanks guys.


So far this is what I have or what I did:




1. Terminal and Unix Set Up
cd ~
my name

ls
Desktop Music
Documents Pictures
Documents copy Public
Downloads Send Registration
Library Sites
Mercury jagex_*********_preferences.dat
Movies jagex_*********_preferences2.dat
my-names-computer:~ myname$

cd library
myname

cd ..
my name

ls –la
total 120
drwxr-xr-x+ 31 myname myname 1054 23 Mar 05:08 .
drwxr-xr-x 7 root admin 238 10 Feb 2010 ..
-rw-r--r-- 1 myname myname 3 20 Sep 2010 .CFUserTextEncoding
-rw-r--r--@ 1 myname myname 21508 23 Mar 19:15 .DS_Store
drwx------ 66 myname myname 2244 23 Mar 18:22 .Trash
-rw------- 1 myname myname 3248 25 Mar 07:00 .bash_history
-rw-r--r-- 1 myname myname 107 22 Mar 21:17 .bash_profile
drwxr-xr-x 3 myname myname 102 22 Dec 2007 .config
drwx------ 3 myname myname 102 3 Nov 2007 .cups
drwxr-xr-x 4 myname myname 136 8 Apr 2008 .dvdcss
drwxr-xr-x 3 myname myname 102 7 Nov 2009 .emacs.d
drwxr-xr-x 3 myname myname 102 23 Mar 05:08 .gem
-rw-r--r-- 1 myname myname 5 23 Mar 05:08 .irb_history
drwxr-xr-x@ 4 myname myname 136 7 Aug 2009 .jagex_cache_32
drwxr-xr-x 3 myname myname 102 2 Sep 2009 .jmf
-rw-r--r-- 1 myname myname 47 23 Mar 2008 .parallels_settings
-rw------- 1 myname myname 1024 4 Oct 2007 .rnd
drwx------+ 7 myname myname 238 25 Mar 07:10 Desktop
drwx------+ 28 myname myname 952 4 Sep 2010 Documents
drwx------ 20 myname myname 680 29 Nov 2007 Documents copy
drwx------+ 332 myname myname 11288 24 Mar 18:41 Downloads
drwx------+ 44 myname myname 1496 13 Nov 2009 Library
drwxr-xr-x 7 myname myname 238 2 Sep 2009 Mercury
drwx------+ 16 myname myname 544 6 Feb 2010 Movies
drwx------+ 5 myname myname 170 2 Feb 2008 Music
drwx------+ 37 myname myname 1258 12 May 2008 Pictures
drwxr-xr-x+ 5 myname myname 170 24 Sep 2007 Public
lrwxr-xr-x 1 root myname 60 19 Sep 2007 Send Registration -> /Users/myname/Library/Assistants/Send Registration.setup
drwxr-xr-x+ 6 myname myname 204 2 Feb 2008 Sites
-rw-r--r--@ 1 myname myname 38 4 Nov 2009 jagex_*********_preferences.dat
-rw-r--r--@ 1 myname myname 63 4 Nov 2009 jagex_*********_preferences2.dat
my-names-computer:~ myname$

my-name-computer:~ myname$ echo $SHELL
/bin/bash
my-names-computer:~ myname$

my-name-computer:~ myname$ which echo
/bin/echo
my-names-computer:~ myname$

my-name-computer:~ myname$ echo $PATH
/usr/local/bin:/usr/local/sbin:/usr/local/mysqul/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
my-name-computer:~ myname$ (notice the u in mysql)

nano .bash_profile
ps1="\u$ "
alias ll="ls -lahG"

export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysqul/bin:$PATH" (notice again the typo)


my-name-computer:~ myname$ cat .bash_profile
ps1="\u$ "
alias ll="ls -lahG"

export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysqul/bin:$PATH"


ll (L L)
my-name-computer:~ myname$ ll
total 120
drwxr-xr-x+ 31 myname myname 1.0K 23 Mar 05:08 .
drwxr-xr-x 7 root admin 238B 10 Feb 2010 ..
-rw-r--r-- 1 myname myname 3B 20 Sep 2010 .CFUserTextEncoding
-rw-r--r--@ 1 myname myname 21K 23 Mar 19:15 .DS_Store
drwx------ 66 myname myname 2.2K 23 Mar 18:22 .Trash
-rw------- 1 myname myname 3.2K 25 Mar 07:00 .bash_history
-rw-r--r-- 1 myname myname 107B 22 Mar 21:17 .bash_profile
drwxr-xr-x 3 myname myname 102B 22 Dec 2007 .config
drwx------ 3 myname myname 102B 3 Nov 2007 .cups
drwxr-xr-x 4 myname myname 136B 8 Apr 2008 .dvdcss
drwxr-xr-x 3 myname myname 102B 7 Nov 2009 .emacs.d
drwxr-xr-x 3 myname myname 102B 23 Mar 05:08 .gem
-rw-r--r-- 1 myname myname 5B 23 Mar 05:08 .irb_history
drwxr-xr-x@ 4 myname myname 136B 7 Aug 2009 .jagex_cache_32
drwxr-xr-x 3 myname myname 102B 2 Sep 2009 .jmf
-rw-r--r-- 1 myname myname 47B 23 Mar 2008 .parallels_settings
-rw------- 1 myname myname 1.0K 4 Oct 2007 .rnd
drwx------+ 7 myname myname 238B 25 Mar 07:10 Desktop
drwx------+ 28 myname myname 952B 4 Sep 2010 Documents
drwx------ 20 myname myname 680B 29 Nov 2007 Documents copy
drwx------+ 332 myname myname 11K 24 Mar 18:41 Downloads
drwx------+ 44 myname myname 1.5K 13 Nov 2009 Library
drwxr-xr-x 7 myname myname 238B 2 Sep 2009 Mercury
drwx------+ 16 myname myname 544B 6 Feb 2010 Movies
drwx------+ 5 myname myname 170B 2 Feb 2008 Music
drwx------+ 37 myname myname 1.2K 12 May 2008 Pictures
drwxr-xr-x+ 5 myname myname 170B 24 Sep 2007 Public
lrwxr-xr-x 1 root myname 60B 19 Sep 2007 Send Registration -> /Users/myname/Library/Assistants/Send Registration.setup
drwxr-xr-x+ 6 myname myname 204B 2 Feb 2008 Sites
-rw-r--r--@ 1 myname myname 38B 4 Nov 2009 jagex_*********_preferences.dat
-rw-r--r--@ 1 myname myname 63B 4 Nov 2009 jagex_*********_preferences2.dat
my-name-computer:~ myname$




2. installing xcode – using default
gcc –v gave me gcc version 4.2.1 (Apple Inc. build 5666) (dot 3)




2. Ruby
my-name-computer:~ myname$ ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
my-name-computer:~ myname$

my-name-computer:~ myname$ which ruby
/usr/bin/ruby
my-name-computer:~ myname$

my-name-computer:~ myname$ ruby -e "puts 100"
100
my-name-computer:~ myname$

my-name-computer:~ myname$
my-name-computer:~ myname$ irb
>> puts 1 +1
2
=> nil
>> quit




2. RubyGems
my-name-computer:~ myname$ gem -v
1.6.2
my-names-computer:~ myname$

my-name-computer:~ myname$ which gem
/usr/bin/gem
my-name-computer:~ myname$

my-name-computer:~ myname$ gem list

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (3.0.5, 2.3.5, 2.2.2, 1.3.6)
actionpack (3.0.5, 2.3.5, 2.2.2, 1.13.6)
actionwebservice (1.2.6)
activemodel (3.0.5)
activerecord (3.0.5, 2.3.5, 2.2.2, 1.15.6)
activeresource (3.0.5, 2.3.5, 2.2.2)
activesupport (3.0.5, 2.3.5, 2.2.2, 1.4.4)
acts_as_ferret (0.4.3)
arel (2.0.9)
builder (2.1.2)
bundler (1.0.10)
capistrano (2.5.2)
cgi_multipart_eof_fix (2.5.0)
daemons (1.0.10)
dnssd (0.6.0)
erubis (2.6.6)
fastthread (1.0.1)
fcgi (0.8.7)
ferret (0.11.6)
gem_plugin (0.2.3)
highline (1.5.0)
hpricot (0.6.164)
i18n (0.5.0)
libxml-ruby (1.1.2)
mail (2.2.15)
mime-types (1.16)
mongrel (1.1.5)
needle (1.3.0)
net-scp (1.0.1)
net-sftp (2.0.1, 1.1.1)
net-ssh (2.0.4, 1.1.4)
net-ssh-gateway (1.0.0)
polyglot (0.3.1)
rack (1.2.2, 1.0.1)
rack-mount (0.6.13)
rack-test (0.5.7)
rails (3.0.5, 2.3.5, 2.2.2, 1.2.6)
railties (3.0.5)
rake (0.8.7, 0.8.3)
RedCloth (4.1.1)
ruby-openid (2.1.2)
ruby-yadis (0.3.4)
rubygems-update (1.6.2)
rubynode (0.1.5)
sqlite3-ruby (1.2.4)
termios (0.9.4)
thor (0.14.6)
treetop (1.4.9)
tzinfo (0.3.25)
xmpp4r (0.4)
my-name-computer:~ myname$

my-name-computer:~ myname$ sudo gem update --system
Password:
Latest version currently installed. Aborting.
my-name-computer:~ myname$




2. Rails
sudo gem install rails
rails –v
3.0.5



2. MySQL
my-name-computer:~ myname$ mysql --version
-bash: mysql: command not found
my-name-computer:~ myname$

my-name-computer:~ myname$ which mysql
my-name-computer:~ myname$

my-name-computer:~ myname$ mysql --version
-bash: mysql: command not found
my-name-computer:~ myname$

my-name-computer:~ myname$ mysql
-bash: mysql: command not found
my-name-computer:~ myname$
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On