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:
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. ]
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$
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.
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$
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
This error I’m not sure that I understand…
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]