Proper Method To Change Default Mysql Engine Permanently

Here the mysql engine is set to InnoDB by default and I want to change it to MyISAM for long run. It was the old way setting parameter “skip-innodb” and commenting “innodb_file_per_table=1” in my.cnf file. Additionally we used to execute mysql query “SET storage_engine=MYISAM;”. Now a days, the above changes wont work and perhaps the mysql server doesn’t come back after initiating a restart since the changes made. The proper method is set the variable “default-storage-engine = MyISAM” like my mysql configuration as follows:

<> ~> cat /etc/my.cnf
default-storage-engine = MyISAM
#innodb_force_recovery = 4

Nothing else you need to do 🙂
Now restart mysql server and check the default engine is set to what

<> ~> /etc/init.d/mysql restart
Shutting down MySQL. [ OK ]
Starting MySQL. [ OK ]

mysql> show engines;
| Engine | Support | Comment | Transactions | XA | Savepoints |
| MyISAM | DEFAULT | MyISAM storage engine | NO | NO | NO |
| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| CSV | YES | CSV storage engine | NO | NO | NO |
| BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO |
| ARCHIVE | YES | Archive storage engine | NO | NO | NO |
| FEDERATED | NO | Federated MySQL storage engine | NULL | NULL | NULL |
| InnoDB | NO | Supports transactions, row-level locking, and foreign keys | NULL | NULL | NULL |
9 rows in set (0.00 sec)

If you want to enable InnoDB as well along with default MyISAM engine, then comment out the variable skip-innodb and remove comment before variable innodb_file_per_table=1

Re-setup and configure the broken WiFi network in RHEL/CentOS/Fedora

Recently I installed CentOS on my VAIO laptop and I had to do some further up-gradation of outdated packages, but that shoved me into a real headache. The WiFi network was working good till starting the upgradation procedure, but stopped right after completing the process. I had no idea then about how this was happened. I was getting only the following information from ifconfig

wlan0 Link encap:Ethernet HWaddr A4:17:31:E0:B6:47
inet6 addr: fe80::a617:31ff:fee0:b647/64 Scope:Link
RX packets:95834 errors:0 dropped:0 overruns:0 frame:0
TX packets:73355 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:119240792 (113.7 MiB) TX bytes:9640456 (9.1 MiB)

and from iwconfig

wlan0 IEEE 802.11bgn ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=16 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off

Sadly no IP Address or anything received from the DSL Modem. I tried to restart network and NetworkManager services and the dhclient as well. But those did not change the situation. I checked /var/log/messages for system messages and dmesg for kernel messages and got the following ones.

Jan 20 12:12:29 john NetworkManager[2042]: error requesting auth for (35) Remote Exception invoking org.freedesktop.PolicyKit1.Authority.CheckAuthorization() on /org/freedesktop/PolicyKit1/Authority at name org.freedesktop.PolicyKit1: org.freedesktop.DBus.Error.Spawn

ADDRCONF(NETDEV_UP): wlan0: link is not ready

It was fully doubtful for me if the wifi device got undetected or lost its driver module itself in running kernel. But it was indeed a relaxation result from lspci and lsmod since the wifi device was already there in place and the running kernel still has the wifi adapter modules kept with it.

<> ~> lspci -v | grep -A 12 Wireless
07:00.0 Network controller: Qualcomm Atheros AR9485 Wireless Network Adapter (rev 01)
Subsystem: Foxconn International, Inc. Device e044
Flags: bus master, fast devsel, latency 0, IRQ 16
Memory at c1200000 (64-bit, non-prefetchable) [size=512K]
Expansion ROM at c1500000 [disabled] [size=64K]
Capabilities: [40] Power Management version 2
Capabilities: [50] MSI: Enable- Count=1/4 Maskable+ 64bit+
Capabilities: [70] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [140] Virtual Channel
Capabilities: [160] Device Serial Number 00-00-00-00-00-00-00-00
Kernel driver in use: ath9k
Kernel modules: ath9k

<> ~> lsmod | grep ath9k
ath9k 91969 0
mac80211 552581 1 ath9k
ath9k_common 3193 1 ath9k
ath9k_hw 408176 2 ath9k,ath9k_common
ath 18078 3 ath9k,ath9k_common,ath9k_hw
cfg80211 619515 3 ath9k,mac80211,ath

Finally I did use the tool iwlist to reestablish the wifi network manually. For that, first install the tool

<> ~> yum -y install wireless-tools

<> ~> ifconfig wlan0 up

<> ~> iwlist wlan0 scan

<> ~> iwlist wlan0 scan
wlan0 Scan completed :
Cell 01 – Address: 1C:7E:E5:0B:D0:E9
Frequency:2.412 GHz (Channel 1)
Quality=33/70 Signal level=-77 dBm
Encryption key:off
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s
Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s
Extra: Last beacon: 92ms ago
IE: Unknown: 0005444C696E6B
IE: Unknown: 010882848B962430486C
IE: Unknown: 030101
IE: Unknown: 2A0100
IE: Unknown: 2F0100
IE: Unknown: 32040C121860
IE: Unknown: 2D1A6C181BFF00000000000000000000000000000000000000000000
IE: Unknown: 3D1601000400000000000000000000000000000000000000
IE: Unknown: DD090010180202F0040000
IE: Unknown: DD180050F2020101800003A4000027A4000042435E0062322F00

Now configure wlan0 with the above information


<> ~> iwconfig wlan0 essid DLink key off

(((ESSID:”DLink” and Encryption key:off in the iwlist scan result)))

Then start the dhcpclient for wlan0

<> ~> dhclient wlan0

You are done 🙂

from dmesg

ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

<> ~> ifconfig | grep -A 7 wlan0
wlan0 Link encap:Ethernet HWaddr A4:17:31:E0:B6:47
inet addr: Bcast: Mask:
inet6 addr: fe80::a617:31ff:fee0:b647/64 Scope:Link
RX packets:104499 errors:0 dropped:0 overruns:0 frame:0
TX packets:80783 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:126639447 (120.7 MiB) TX bytes:11239675 (10.7 MiB)

<> ~> iwconfig
wlan0 IEEE 802.11bgn ESSID:”DLink”
Mode:Managed Frequency:2.412 GHz Access Point: 1C:7E:E5:0B:D0:E9
Bit Rate=1 Mb/s Tx-Power=16 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=43/70 Signal level=-67 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:11 Missed beacon:0

If you don’t want to repeat these steps each time when you start the system, then you can set those in a single script file as follows:

<> ~> cat /root/
#This is to bring up wifi at the startup
ifconfig wlan0 up
iwconfig wlan0 essid DLink key off
sleep 5
dhclient wlan0

<> ~> chmod +x /root/

Then set the command sh /root/ in file /etc/rc.local or /etc/rc.d/rc.local inorder to establish wifi network along with all the run levels while system booting process.