-2

I installed php54 with mysql, but I can not use

mysql -u root

in terminal to access mysql (error: does not recognize command), but

phpinfo() 

tells me it is installed

what can I do?

UPDATE

I thought it was installed, but I guess it was not. I was looking in cellar or /usr/local (forgot the folder where to look), typed brew list then decided to

brew install mysql 

and I have it running now. I do NOT understand the phpinfo or maybe they are just the drivers?

Apparently, I can not post here, so I will post somewhere else if anymore issues ( I am a professional and I have a server, does that not make a professional server?)

thanks

Richard
  • 97
  • 7
  • What do you mean by 'can not use `mysql u root`'? What error message are you getting ? – user9517 Jun 01 '13 at 06:54
  • I dont have enough rep to comment - however - can you tell us what happens when you type `mysql u root`? There must be some sort of message. If it is access is denied id try `mysql u root -p` that used to give me trouble. Failing that id agree with @spuder about it not being in your path. How did you go about trying to install mysql? More info would help us help you :) – steve Jun 01 '13 at 06:59
  • 1
    Welcome to [sf]. Unfortunately, setting up your development environment is not within our scope here. See our [About page](http://serverfault.com/about) for more information. – Michael Hampton Jun 01 '13 at 07:12
  • sorry, you recommend Superuser or AskDifferent, UnixLinux? – Richard Jun 01 '13 at 07:35

1 Answers1

1

From what you have described, it sounds like mysql is not in your path.

If the following command returns an error, then you will need to add mysql to your environment

which mysql

(this command can be dangerous if you aren't familiar with shell environments. Research it before running it. )

PATH=$PATH:/usr/local/mysql/bin

You will need to close and reopen terminal for the changes to take affect.

spuder
  • 1,695
  • 2
  • 25
  • 42
  • Doesn't which follow the PATH ? You don't say where you add to the PATH, if you do it at the command line then it takes effect immediately and would be lost if you restarted the terminal. – user9517 Jun 01 '13 at 06:53
  • @Spuder,@lain, thanks for your answer, I updated my question – Richard Jun 01 '13 at 07:22