Monday, December 24, 2012

Last_Errno: 1007: Error 'can’t create database 'databasename'; database exists' on query. Default database: 'databasename'. Query: 'create database databasename'



1         Check below entry in slave server:
            mysql> show slave status\G;
Master_Log_File: mysql-bin.000006
            Read_Master_Log_Pos: 231202
                        Relay_Log_File: mysqld-relay-bin.000004
                        Relay_Log_Pos: 503
            Relay_Master_Log_File: mysql-bin.000003
           Slave_IO_Running: Yes
            Slave_SQL_Running: No
           
Note: 
a)      Both Master_Log_File and Relay_Master_Log_File must be same.
b)      Both Slave_IO_Running and Slave_SQL_Running must be yes.

2          Check file name and bin log position on master server:
mysql> show master status;
+------------------+----------+--------------+------------------+
| File             | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| mysql-bin.000006 |   231202 |              |                  |
+------------------+----------+--------------+------------------+
1 row in set (0.00 sec)

3.         Stop the slave server:
mysql> stop slave;
Query OK, 0 rows affected (0.00 sec)

4.         Change master log file name and log position
mysql> CHANGE MASTER TO MASTER_HOST='xxxxx.xxx.xx',MASTER_USER='master_user',MASTER_PASSWORD='master_user_password',MASTER_LOG_FILE='mysql-bin.000006',MASTER_LOG_POS=202;
Query OK, 0 rows affected (0.05 sec)

5.         Start Slave Server:
mysql> start slave ;
Query OK, 0 rows affected (0.01 sec)

6.         Check slave server status:
mysql> show slave status\G;
           Master_Log_File: mysql-bin.000006
            Read_Master_Log_Pos: 231202
                        Relay_Log_File: mysqld-relay-bin.000002
                        Relay_Log_Pos: 235
            Relay_Master_Log_File: mysql-bin.000006
            Slave_IO_Running: Yes
            Slave_SQL_Running: Yes
            

Friday, December 21, 2012

httpd: apr_sockaddr_info_get() failed for node1



1.     Check short name
       
        # hostname -s
                 node1

2.     Check FQDN name

        # hostname -f
                    hostname: Host name lookup failure

3.     Edit /etc/hosts and add FQDN name:

        # cat /etc/hosts
       x.x.x.x node1.test.com node1

4.     Restart httpd service

httpd: Could not reliably determine the server's fully qualified domain name, using x.x.x.x for ServerName



1      Edit /etc/hosts and add FQDN name:
        
         # cat /etc/hosts
    x.x.x.x node1.test.com node1

2.     Restart httpd service

Friday, July 13, 2012

Configuration file was created by a VMware product with more features than this version

1.      Take backup copy of virtual machine.

2.      Locate file with extension .vmx and open it in a text editor:

Change from:

virtualHW.version = "8"

to

virtualHW.version = "7"

3.      Locate file with extension .vmdk and open it in a text editor:

Change from:

ddb.virtualHWVersion = "8"

to

ddb.virtualHWVersion = "7"

Now you can successfully boot the Virtual Machine.

Device eth0 has different MAC address than expected

1.                  Check virtual machine MAC address and change accordingly in Linux box

Or,

2.         Edit /etc/sysconfig/network-script/ifcfg-eth0 in Linux box

3.         Remove all except DEVICE, ONBOOT, BOOTPROTO parametes.

4.         Change BOOTPROTO=dhcp:

            # cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes

5.         Restart network service

6.         Check MAC address by “ifconfig” command:

            # ifconfig eth0 | grep HWaddr
eth0      Link encap:Ethernet  HWaddr 00:0C:29:48:DB:9A

7.         Add HWADDR, IPADDR, NETMASK, GATEWAY in “ifcfg-eth0”  file:

# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
HWADDR=00:0C:29:48:DB:9A
IPADDR=192.168.100.231
NETMASK=255.255.254.0
GATEWAY=192.168.100.1

8.         Restart network service