Fixing MySQL Slave_IO_Running: No

If you encounter Slave_IO_Running: No but Slave_SQL_Running: Yes in MySQL replication setup, here may have something that can help.

mysql> SHOW SLAVE STATUS\G
*************************** 1. row ***************************
             Slave_IO_State:
                Master_Host: 192.168.58.13
                Master_User: rep
                Master_Port: 3306
              Connect_Retry: 60
            Master_Log_File: master-bin.000052
        Read_Master_Log_Pos: 11114210
             Relay_Log_File: slave-relay-bin.000001
              Relay_Log_Pos: 373226
      Relay_Master_Log_File: master-bin.000052
           Slave_IO_Running: No
          Slave_SQL_Running: Yes
            Replicate_Do_DB:
        Replicate_Ignore_DB:
         Replicate_Do_Table:
     Replicate_Ignore_Table:
    Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
                 Last_Errno: 0
                 Last_Error:
               Skip_Counter: 0
        Exec_Master_Log_Pos: 9697034
            Relay_Log_Space: 1790402
            Until_Condition: None
             Until_Log_File:
              Until_Log_Pos: 0
         Master_SSL_Allowed: No
         Master_SSL_CA_File:
         Master_SSL_CA_Path:
            Master_SSL_Cert:
          Master_SSL_Cipher:
             Master_SSL_Key:
      Seconds_Behind_Master: 14431
1 row in set (0.00 sec)

This basically means that the slave server is working, but for some reason the master does not send anything to the slave. To troubleshoot this problem, go to the master server instead and check the error log. In my case, this is what I found.

[root@master mysql]# tail master.err
120220 10:11:45  Failed to open log (file './master-bin.000050', errno 13)

In my case, the file master-bin.000050 is actually there, but the owner is root which therefore cannot be opened by the account mysql. Most likely it is because someone started MySQL using the root account after a server down and later on someone restarted the MySQL again under the mysql account. Anyway changed the owner of the file and problem fixed.

Advertisements

Solving MySQL Installation of system tables failed

First of all, this is the case I encountered and may not be useful on your case.

Situation

To reset the data in MySQL database, for the sake of fixing out-sync database replication.

Procedure

  1. Stopped MySQL service
  2. Renamed the original data folder for backup purpose
  3. Create a new data folder with the same original name
  4. Execute database installation mysql_install_db
  5. Import the dumped data
  6. Set up replication

Problem

When executing database installation, the error message below appeared.

Installation of system tables failed!

Other Symptom

The following command print nothing to the console.

mysqld -V

Cause

After checking the log at /var/log/message, it is found that the SELinux prevented the installation.

Solution

Fix the security context issue used by SELinux

Sorry I am not going to provide the way here because I having really tried that myself.

Permanent set SELinux to Permissive or Disable (Security Risk)

Obviously this is not a good way to fix the problem but if you still want to do that, here is the way.

Edit the file:

vim /etc/selinux/config

Set to permissive

SELINUX=permissive

Or disable

SELINUX=disabled

Finally

This is what you can see:

[root@my-server ~]# mysqld -V
mysqld  Ver 4.1.22-standard-log for pc-linux-gnu on i686 (MySQL Community Edition - Standard (GPL))
[root@my-server ~]#

Extra: Temperately disable SELinux

Here is the way:

echo 0 > /selinux/enforce

Reference

HOWTO: Turning off or disabling SELinux

vClock 1.2 Published!

vClock App IconWell my friend installed the app and I found that it is not working as expected because he is using a Samsung Android phone with different built-in alarm clock. Because there is no standard API for calling the alarm (not until API 9 seems) and therefore the app need to relies on the package name and class name for calling the alarm. Anyway here fixed the Samsung and probably Sony phone.

Below is a change log in version 1.2:

! Fixed not able to launch alarm setting page on some Samsung, Sony Android phones
! Fixed possible crash when the alarm setting page is not found
! Fixed a bug in displaying incorrect 12/24 hour format when changing system language