View Full Version : mySQL install confusion
Jan 3, 2011, 11:56 AM
I am writing here because all my extrapolation from other peoples comments have failed. So if someone is will to provide some words of advice.
Installed mySQL, then build the databases, then set the php.ini file to point to the /var/mysql/mysql.sock but when
The problem is as follows :
With mysqladmin ping I get that the /var/mysql/mysql.sock is not available,
But if I cd /usr/local/mysql/bin and ./mysqladmin ping I get mysql is alive
So, my guess is that, mysqladmin is not the same as /user/local/mysql/bin/mysqladmin
But I do not know how to resolve this.
Jan 3, 2011, 03:07 PM
A little update.
Seems SL comes pre-installed with the mySQL programs, so my install of mySQL is sort of a duplicate.
The PATH variable is set to go to the pre-installed mySQL programs which explains the confusion above.
However, I could not find where the pre-installed mySQL actually stores the data, config files, etc.
So I have now set the whole thing to work with my install of mySQL, but I have to make sure I go to the correct /usr/local/mysql directory first.
If anyone has some science on how to get the pre-installed mySQL, I am all ears
(and would lead to me removing the one I installed).
Jan 3, 2011, 07:12 PM
not sure what exactly you are trying to do but assuming you are on os x server this might give you all the info you need in terms of where to look for your installation etc.
Jan 7, 2011, 12:59 PM
I had seen that post but it is not what I have on my mini server. That post specifically asks to de-install /usr/local/mysql. This is the normal place that mysql installs iteself.
On my mini I have /usr/bin which contains all the mysql executables and /usr/local/mysql which I installed.
Hence I conclude mysql seems to be pre-installed in SL server.
The situation I have is that the PATH command is set to go thru /usr/bin and not /usr/local/mysql/bin, so all my commands do not work.
The short-term-fix would be to change the PATH (which I do not know how to do) but the long-term fix would be to use the /usr/bin executables (but here folders such as /data are missing....)
So I am a little stuck
Am I the only person that noticed the mysql executables in /usr/bin ?? :confused:
Jan 8, 2011, 01:01 PM
I'm still at this, I hate to have 2 installs of the same thing on the same mac.
Is there some sueful reference that can tell me where to check for a mySQL install ?
I'm hoping to use this to see the extent of the duplicate install and remove the pointless extras.
Also more about the my.cnf file.
any comments welcome
Jan 9, 2011, 04:45 AM
I recommend that you take a look about what you bought at the info at apple.com about SL Server:
...and see that MySQL is indeed there, it even has a rudimentary preference in Server Admin, with which you can get it running in 3 seconds after install.
Then, you might be interested in the fine manual:
Furthermore, if you need the "stock" MySQL that Apple ships, you can find the right version(s) at: http://opensource.apple.com (10.6.6 not yet available)
These packages are also needed when you for example need the header files, because you want to compile a Ruby module for MySQL...
Jan 9, 2011, 12:08 PM
Thank you ever so much for these few but valuable pointers.
Indeed the mySQL server IS INCLUDED and it is easy to setup.
I could point out that this was a gift so I had not read the apple specs, and the micro booklet that was in the box made no mention of mysql... but then I could have looked at the apple site 1st, rather than google.
Anyway thanks. :)
Jan 9, 2011, 12:34 PM
Hate to say this but now mySQL is moaning that "mysql_connect(): Host '192.168.2.199' is not allowed to connect to this MySQL server".
I have checked for the network user setting and it is ticket. Various sites say I have to grant some privileges, but this was not the case with my self-installed mysql.
After various grant tries I can only access the mySQL standard test db, whilst the ones I create are all somehow blocked when accessed via web...
when will this end...
Jan 9, 2011, 03:50 PM
You have to grant rights to a user like:
firstname.lastname@example.org in your case, for the concerned databases, read, write, create etc.
I think it would be best to install Navicat Lite (Free for non-commercial) on the server, then you would not have any problems to connect to localhost as root and then set the necessary permissions.
Jan 9, 2011, 04:43 PM
That was a simultaneous solution. Indeed Granting rights is necessary. I remain a little confused as to why this was not necessary before, but I think that will remain unanswered.
My Xmas gift is not humming away providing file server, web, mysql etc to the households. Nice little machine.
thanks to all input, although short and concise it was correct.