Unix Technical Forum

MySQL socket and logs locations

This is a discussion on MySQL socket and logs locations within the MySQL General forum forums, part of the MySQL category; --> Hi, I've installed MySQL 5.0.24a-standard on my AMD 64, SuSE 10.0 box, using the binary distribution from the MySQL ...


Go Back   Unix Technical Forum > Database Server Software > MySQL > MySQL General forum

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 09:20 PM
Peter Bradley
 
Posts: n/a
Default MySQL socket and logs locations

Hi,

I've installed MySQL 5.0.24a-standard on my AMD 64, SuSE 10.0 box, using
the binary distribution from the MySQL downloads site. I've also
installed the GUI tools from the same location, using the SuSE 10.x rpm
packages. The intention is to use MySQL with PHP5 and Apache. Both
these latter have been installed from the SuSE rpm files supplied on DVD
with SuSE 10.0. I have a couple of problems.

Firstly, PHP seems to want the mysql.sock file to be in
/var/lib/mysql/mysql.sock - at least this is the location given by
phpinfo() - instead of /tmp/mysql.sock. This location appears to be
contained in an environment variable called MYSQL_SOCKET, but I can't
find where it is set. One solution would be to get MySQL to put the
mysql.sock file in the place expected by PHP. Is this possible?

At the moment, I have a /etc/my.cnf file with the following content:

[mysqld]
socket=/tmp/mysql.sock

[client]
socket=/tmp/mysql.sock

I added these entries in an attempt to get PHP to use the actual
location that MySQL is using, but this doesn't appear to have had any
effect (according to phpinfo()).

Secondly, MySQL appears to be trying to write logs to /var/log/mysql
(according to MySQL Administrator). This location does not exist. I'm
getting no error messages, but presumably this means I'm not getting any
logs either. Should I create this location and if so, what permissions
and ownership should I give to the directory?

Thanks in advance


Peter

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 09:20 PM
Russbucket
 
Posts: n/a
Default Re: MySQL socket and logs locations

Peter Bradley wrote:

> Hi,
>
> I've installed MySQL 5.0.24a-standard on my AMD 64, SuSE 10.0 box, using
> the binary distribution from the MySQL downloads site. I've also
> installed the GUI tools from the same location, using the SuSE 10.x rpm
> packages. The intention is to use MySQL with PHP5 and Apache. Both
> these latter have been installed from the SuSE rpm files supplied on DVD
> with SuSE 10.0. I have a couple of problems.
>
> Firstly, PHP seems to want the mysql.sock file to be in
> /var/lib/mysql/mysql.sock - at least this is the location given by
> phpinfo() - instead of /tmp/mysql.sock. This location appears to be
> contained in an environment variable called MYSQL_SOCKET, but I can't
> find where it is set. One solution would be to get MySQL to put the
> mysql.sock file in the place expected by PHP. Is this possible?
>
> At the moment, I have a /etc/my.cnf file with the following content:
>
> [mysqld]
> socket=/tmp/mysql.sock
>
> [client]
> socket=/tmp/mysql.sock
>
> I added these entries in an attempt to get PHP to use the actual
> location that MySQL is using, but this doesn't appear to have had any
> effect (according to phpinfo()).
>
> Secondly, MySQL appears to be trying to write logs to /var/log/mysql
> (according to MySQL Administrator). This location does not exist. I'm
> getting no error messages, but presumably this means I'm not getting any
> logs either. Should I create this location and if so, what permissions
> and ownership should I give to the directory?
>
> Thanks in advance
>
>
> Peter

I just check my install of mysql (version mysql-4.1.13-3.8 on SUSE 10.0) and
the socket is in /var/lib/mysql and the mysqld log is in /var/lib/mysql.
This is the mysql version that came with my 10.0 DVD. Did you use YAST to
install? I don't know if these locations changed with the later version of
mysql.

From phpinfo:
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQLI_SOCKET /var/lib/mysql/mysql.sock

mysql.default_socket no value no value

Are your sockets enabled:
sockets
Sockets Support enabled

Sorry I cannot help anymore.
--
Russ
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 09:20 PM
Peter Bradley
 
Posts: n/a
Default Re: MySQL socket and logs locations

Russbucket wrote:
> I just check my install of mysql (version mysql-4.1.13-3.8 on SUSE 10.0) and
> the socket is in /var/lib/mysql and the mysqld log is in /var/lib/mysql.
> This is the mysql version that came with my 10.0 DVD. Did you use YAST to
> install? I don't know if these locations changed with the later version of
> mysql.
>

Thanks a lot for that, Russ. The difference between our two setups is
that you've done the SuSE 10.0 YaST install of mysql 4.1. I needed to
upgrade from that to MySQL 5.0, because I wanted to use stored
procedures. The result is that I had to do a binary install from files
supplied by MySQL on their site. It was either that or upgrade to SuSE
10.1.

However, I think I've sorted it by altering my /etc/my.cnf file. Time
will tell
> Sorry I cannot help anymore.
>

Thanks for trying. It's appreciated.


Peter


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:29 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com