Solving the problem with privileged ports in ODSEE instance creation

It is possible that creation of an instance in Oracle Directory Server might end up with the following error message:

port number 389 is a privileged port.

This happens because all the ports less than 1024 on Linux are treated as privileged. Most of our well know ports like 389 for the LDAP, 80 for HTTP, 443 for HTTPS reside in this range of ports.

Linux enforces that the services cannot be created at the privileged ports until and unless the privileges are escalated.

In this particular case, we can start the instance using the following command:

sudo dsadm start <path-to-instance>

The main reason for need for extra privileges when we use the privileges may be because there is a chance that the firewalls do not block traffic from these ports. Any attacker who might be interested in stealing your data over the network could be opening such ports so that he could escape firewalls. To reduce the attack surface, it is enforced that the privileged port need root access.

Solving the problem “Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ ”

MySQL server is usually connected by using the following command

mysql      –u      root      –p

some times we may encounter the following the error

can’t connect to local MySQL server through socket /var/lib/mysql/mysql.sock

A socket is used to bridge connection between the server and client.

Error message explains that it is not able to find that socket file.

Socket file is automatically created when we start the MySQL server and disappears automatically when the server is stopped.

This problem most probably arises when you accidentally delete it or if you reinstall same server again or because of server might not be running currently.

Current running state of the server could be known using the following command

service     mysqld     status

Use the following command to solve the issue

sudo     /etc/init.d/mysqld     restart

The above command is used to restart the MySQL server so that the socket file can be created.