开发者

cannot load mysql from terminal but can start mysql with system preferences

I understand that this question has been asked several times before, I have been through many solutions and thus far nothing has worked.

There is definitely something wrong with the directory MySQL is trying to install itself into (usr/local/mysql). The weird thing about my error is that I am able to start my server from system prefrences with the mySQLprefPanel manager..

I have tried reinstalling the database, using the command prompt to edit files that define the location of mysql using terminal to change directorys all sorts..

However I cannot access it with mysql -u root -p command in terminal... this leaves me with "command not found error..."

Are there any solutions that you know of that might benefit my particular pr开发者_StackOverflow社区oblem so I can start setting up my databases.


There are two possibilities that I can think of: 1. Improper installation: goto the location where you have installed Mysql and then look in the /bin folder if you have got "mysql". If you have mysql, then please refer next possiblity 2. Not running as a service: In this case, if you are using linux, check with netstat -a which would give you list of running services. Check if you have mysql service running with port:3306 (or whatever you have assigned it to). If it is not running, please install mysql as a service. You can find lot of tutorial on it.


I know this is going to be an incomplete answer - I'll fill in th rest when I get home tonight.

I had a similar problem and I had to create a symbolic link to point to /tmp/mysql.sock somewhere (this bit to follow). For whatever reason the installation I used was not pointing at the /tmp directory, and rather than copying the files from tmp to (other) I just created a sym-link in the correct directory that pointed to /tmp

Can I suggest also that you download the mysql GUI here. I found this to be a much better way of managing your database rather than through the terminal.

UPDATE: I've just found where mine is situated: the mysql.sock file is at /var/mysql/mysql.sock on my macbook air. the mysql file is at /usr/local/mysql along with another file mysql-5.5.11-osx10.6-x86_64

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜