stoid said:
Maybe this is what you were trying to tell me to do, but I typed:
Code:
sudo /usr/local/mysql/bin/mysql -u root
into a bash terminal window, and it logged me into the mysql as user 'root@localhost' and is letting me create a database. Unless there is a simpler way to login in the future... but this works for now. Thanks again for all your help!!
http://www.sitepoint.com/
down at the bottom right is a like for a book on php and mysql. it has the first 3 chapters in pdf. it will answer all the question you are having. it even has Mac specific examples.
This only applies if you are using bash. You can tell by typing echo $SHELL. if you see: '/bin/bash/' you are using bash.
as to your question about logining in. you can simply matters by making a script by editing your the ~/.bashrc file. Another poster tried to get you do it but his ~/.profile was wrong. don't use textedit causes problems. the easiest way is from the command like and type 'pico .bashrc'. although, you can edit it with emacs or vi if you would like.
anyways add this line to your ~/.bashrc
Code:
export PATH=/usr/local/mysql/bin:$PATH
ctrl-x to save.
exit out of terminal and open a new session.
the line will make every command in /usr/local/mysql/bin accessable to you without typing the long command line.
also, i use a script to login to mysql. use 'pico lm' and enter (ctrl-x to save)
Code:
mysql -h localhost -u loginName -p
then from terminal do chmod 766 lm. now you do './lm' and simply login.