SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member Prorsum's Avatar
    Join Date
    Dec 2012
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Installing MySQL Mac OS X Lion 10.7.5

    I'm following the manual installation of MySql described in Kevin Yank's PHP & MYSQL Novice to Ninja, Fifth Edition, 2012.

    The first steps work all fine. Now I don't understand this:

    One last task you'll want to do is add the/usr/local/mysql/bin directory to your system path. Doing this enables you to run programs like mysqladmin and mysql in the Terminal without typing out their full paths. Pop open a new Terminal window and type these commands:

    Machine:∼ user$ sudo su
    Password:
    sh-3.2# echo '/usr/local/mysql/bin' >> /etc/paths.d/mysql
    sh-3.2# exit

    I did that.

    Close the terminal window and open a new one to allow this change to take effect. Then, with your MYSql server running, try running the mysqladmin program from your home directory.

    I did that. But what is it exactly?

    Then:

    Machine:∼ user$ mysqladmin status

    Here I get this message:

    Last login: Sun Mar 24 17:23:59 on ttys000
    Carolinas-MacBook-Pro:~ Carolina S$ mysqladmin status
    -bash: mysqladmin: command not found
    Carolinas-MacBook-Pro:~ Carolina S$

    The book says: if everything worked the way it's supposed to, you should see a brief list of statistics about your MySql server. Obviously after that last message I don't get this. ]

    But Mysql works: switches on and off.

    Thanks!

  2. #2
    SitePoint Member Prorsum's Avatar
    Join Date
    Dec 2012
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    me again:

    I tried for a third time and now I get:

    Last login: Sun Mar 24 17:45:44 on ttys000
    Carolinas-MacBook-Pro:~ Carolina S$ mysqladmin status
    Uptime: 1441 Threads: 1 Questions: 722 Slow queries: 0 Opens: 33 Flush tables: 1 Open tables: 26 Queries per second avg: 0.501
    Carolinas-MacBook-Pro:~ Carolina S$

    So it worked!

  3. #3
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,025
    Mentioned
    211 Post(s)
    Tagged
    1 Thread(s)
    It did work!

    What you did in your first step was adding the route where MySQL is installed to your computer's path.

    Most of the time, when you use a program from the prompt window, you will have to move to the directory where the executable file of that program is.

    As an example, if you want to open Microsoft Word from the prompt window, you will have to move to the folder where MSWord.exe is.

    By adding the folder route to the path variable, it doesn't matter which folder you're seeing in your prompt screen, as soons as you type the exectable file, the program (or service) will start.

    I hope that I explained myself properly.

  4. #4
    SitePoint Member Prorsum's Avatar
    Join Date
    Dec 2012
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For the installation of PHP my admin, the book sends you to www.phpmyadmin.net. I don't understand that site. So I followed instructions from this website: http://www.coolestguyplanettech.com/...osx-10-7-lion/

    There it says that when installing MySQl one should have chosen a username and password. The book doesn't mention this. So I follow their link back to MySql install here: http://www.coolestguyplanettech.com/...-on-os-x-10-6/

    The first time it was working, but after going back to phpmyadmin something changed. I tried the install again and I get:

    Last login: Wed Apr 10 15:32:28 on ttys000
    Carolinas-MacBook-Pro:~ Carolina S$ source ~/.bash_profile
    -bash: /Users/Carolina S/.bash_profile: No such file or directory
    Carolinas-MacBook-Pro:~ Carolina S$

    So I go back to your book and start again:

    Last login: Wed Apr 10 15:34:34 on ttys000
    Carolinas-MacBook-Pro:~ Carolina S$ mysqladmin status
    mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'Carolina S'@'localhost' (using password: NO)'
    Carolinas-MacBook-Pro:~ Carolina S$

    It's very annoying when a manual doesn't mention important points. Why didn't the author didn't add just one more page to do the install for phpmyadmin??? Made me waste so much time.










    Last login: Wed Apr 10 15:22:06 on ttys000
    Carolinas-MacBook-Pro:~ Carolina S$ sudo /usr/local/mysql/bin/mysqld_safe
    Password:
    130410 15:26:48 mysqld_safe Logging to '/usr/local/mysql/data/Carolinas-MacBook-Pro.local.err'.
    130410 15:26:48 mysqld_safe A mysqld process already exists
    Carolinas-MacBook-Pro:~ Carolina S$

  5. #5
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,025
    Mentioned
    211 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Prorsum View Post
    There it says that when installing MySQl one should have chosen a username and password. The book doesn't mention this. S
    I would have to re-read the book but I'm quite certain that it does mention it... but I could be wrong, of course, because I've read the book a long time ago. Still, I find strange that the instructions fail on an Apple computer (laptop or not) because as far as I know the author uses precisely Macintosh... I'm kind of sure that @Kevin Yank ; has not changed his fav OS. yet
    Quote Originally Posted by Prorsum View Post
    The first time it was working, but after going back to phpmyadmin something changed. I tried the install again and I get:

    Last login: Wed Apr 10 15:32:28 on ttys000
    Carolinas-MacBook-Pro:~ Carolina S$ source ~/.bash_profile
    -bash: /Users/Carolina S/.bash_profile: No such file or directory
    Carolinas-MacBook-Pro:~ Carolina S$
    This error I'm not sure that I understand...

    Quote Originally Posted by Prorsum View Post
    So I go back to your book and start again:

    Last login: Wed Apr 10 15:34:34 on ttys000
    Carolinas-MacBook-Pro:~ Carolina S$ mysqladmin status
    mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'Carolina S'@'localhost' (using password: NO)'
    Carolinas-MacBook-Pro:~ Carolina S$
    Now this error I do know. It simply means that your user name or password is wrong. But MySQL is installed and running ;-)
    It's very annoying when a manual doesn't mention important points. Why didn't the author didn't add just one more page to do the install for phpmyadmin??? Made me waste so much time.
    There's always room for improvement










    Last login: Wed Apr 10 15:22:06 on ttys000
    Carolinas-MacBook-Pro:~ Carolina S$ sudo /usr/local/mysql/bin/mysqld_safe
    Password:
    130410 15:26:48 mysqld_safe Logging to '/usr/local/mysql/data/Carolinas-MacBook-Pro.local.err'.
    130410 15:26:48 mysqld_safe A mysqld process already exists
    Carolinas-MacBook-Pro:~ Carolina S$[/quote]


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •