After upgrading MySQL binaries mysqld will not start at all any more and shows below error :
CT-1977-bash-4.1# service mysqld start
Another MySQL daemon already running with the same unix socket.
Starting mysqld: [FAILED]
MySQL service does not shut down gracefully during the OS reboot, leaving the old /var/lib/mysql/mysql.sock such that mysqld will not start up. Some people were able to reproduce this error on a CentOS 6.5 KVM guest virtual system by rebooting the host CentOS 6.5 system. CentOS is supposed to gracefully shut down the guest systems, but this seems to be failing in the case of mysqld.
Confirmed Red Hat Linux 6.5 bug – https://bugzilla.redhat.com/show_bug.cgi?id=1037650
Issue discussion on MySQL bug tracker – http://bugs.mysql.com/bug.php?id=71086
Simple steps to reproduce this issue:
service mysqld start
killall -9 mysqld_safe mysqld
service mysqld start
A quick way to restart MySQL is as below :
Remove socket file and restart mysql: CT-1977-bash-4.1# ls -la /var/lib/mysql/mysql.sock
srwxrwxrwx 1 mysql mysql 0 Jan 8 20:13 /var/lib/mysql/mysql.sock
CT-1977-bash-4.1# rm /var/lib/mysql/mysql.sock
CT-1977-bash-4.1# /etc/init.d/mysqld restart
Stopping mysqld: [ OK ]
Starting mysqld: [ OK ]
A work around for the issue is to modify ‘/etc/init.d/mysqld’ script:
Make a backup copy of the startup script. cp -p /etc/init.d/mysqld /etc/init.d/mysqld.orig
Edit the file /etc/init.d/mysqld to look as below : =========================
# if fuser "$socketfile" &>/dev/null ; then
# echo "Socket file $socketfile exists. Is another MySQL daemon already running with the same unix socket?"
# action $"Starting $prog: " /bin/false
# return 1
# We check if there is already a process using the socket file,
# since otherwise this init script could report false positive
# result and mysqld_safe would remove the socket file, which
# actually uses a different daemon.
if fuser "$socketfile" &>/dev/null ; then
echo "Socket file $socketfile exists. Is another MySQL daemon already running with the same unix socket?"
action $"Starting $prog: " /bin/false
Now restart MySQL : CT-1977-bash-4.1# service mysqld start
Starting mysqld: [ OK ]
The private key contains a series of numbers. Two of those numbers form the “public key”, the others are part of your “private key”. The “public key” bits are also embedded in your Certificate (we get them from your CSR). To check that the public key in your cert matches the public portion of your private key, you need to view the cert and the key and compare the numbers. To view the Certificate and the key run the commands:
The `modulus’ and the `public exponent’ portions in the key and the Certificate must match. But since the public exponent is usually 65537 and it’s bothering comparing long modulus you can use the following approach:
One question I hear quite often is “how do I add IP aliases in FreeBSD?” It’s not terribly intuitive, but you can follow these steps:
Example: Server’s primary IP: 192.168.1.11
Additional IP’s to add: 192.168.1.12, 192.168.1.13, and 192.168.1.14
Boot-time configuration: Add it to /etc/rc.conf first (so you don’t forget). In this example, we have a Realtek card called rl0: ifconfig_rl0="inet 192.168.1.11 netmask 255.255.255.0" ifconfig_rl0_alias0="inet 192.168.1.12 netmask 255.255.255.0" ifconfig_rl0_alias1="inet 192.168.1.13 netmask 255.255.255.0" ifconfig_rl0_alias2="inet 192.168.1.14 netmask 255.255.255.0"
IMPORTANT NOTE: Start with the number 0 (zero) any time that you make IP alias configurations in /etc/rc.conf. This is BAD form:
If you do it the wrong way (which means starting alias with anything but alias0), only the primary comes up. Keep that in mind.
Bringing up the new IP’s: You can do things the extraordinarily dangerous way: # /etc/rc.network restart
Or, you can follow the recommended steps: # ifconfig rl0 alias 192.168.1.12 netmask 255.255.255.0 # ifconfig rl0 alias 192.168.1.13 netmask 255.255.255.0 # ifconfig rl0 alias 192.168.1.14 netmask 255.255.255.0
Test your work: Any good system administrator knows to test things once their configured. Make sure to ping your new IP’s from a source on your network and outside your network (if possible/applicable).
cron is a unix, solaris utility that allows tasks to be automatically run in the background at regular intervals by the cron daemon. These tasks are often termed as cron jobs in unix , solaris.
Crontab (CRON TABle) is a file which contains the schedule of cron entries to be run and at specified times.
A crontab file has five fields for specifying day , date and time followed by the command to be run at that interval.
* * * * * command to be executed
– – – – –
| | | | |
| | | | +—– day of week (0 – 6) (Sunday=0)
| | | +——- month (1 – 12)
| | +——— day of month (1 – 31)
| +———– hour (0 – 23)
+————- min (0 – 59)
* in the value field above means all legal values as in braces for that column.
The value column can have a * or a list of elements separated by commas. An element is either a number in the ranges shown above or two numbers in the range separated by a hyphen (meaning an inclusive range).