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 ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| |||
| 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 |
| ||||
| 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 |