Tagged: connection

Samba start / restart error: smbd_open_once_socket: open_socket_in: Addr

- by admin

Once I have got this problem with samba in Oracle Linux 6 (the same I could reproduce in RedHat 6 as well):

On start or restart of smb service var/log/samba/log.smbd reports:
smbd/server.c:501(smbd_open_one_socket) smbd_open_once_socket: open_socket_in: Address already in use

The solution was:
sysctl net.ipv6.bindv6only=1

as it looks like the problemĀ happens on systems which IPv6 support where :: also listens for IPv4 connections. So the bind to 0.0.0.0 fails.

Mac OS, MySQL: No such file or directory (trying to connect via unix:///

- by admin

Error on attempt to connect locally to MySQL server DB with PHP on MacOS X Lion 10.7:

No such file or directory (trying to connect via unix:///var/mysql/mysql.sock)

Solution 1:

instead of localhost use 127.0.0.1:
mysql_connect ('127.0.0.1', $user, $password);

Solution 2:

In /etc/php.ini change
pdo_mysql.default_socket = /var/mysql/mysql.sock
mysql.default_socket = /var/mysql/mysql.sock
mysqli.default_socket = /var/mysql/mysql.sock

to
pdo_mysql.default_socket = /tmp/mysql.sock
mysql.default_socket = /tmp/mysql.sock
mysqli.default_socket = /tmp/mysql.sock

Do not forget to restart Apache after update :-)

FYI: If no /etc/php.ini found just copy /etc/php.ini.default to /etc/php.ini

« All tags