mysqladmin command 1)Change MySQL root password mysqladmin -u root -ptmppassword password 'newpassword' 2) Check MySQL server is up or not mysqladmin -u root -p ping 3) Find MySQL server version mysqladmin -u root -ptmppassword version 4) Show the current MySQL servers status mysqladmin -u root -ptmppassword status 5) Find the values of status variables mysqladmin -u root -ptmppassword extended-status 6) Find the values of MySQL system variables mysqladmin -u root -ptmppassword variables 7) Show all the running process/queries in MySQL databases mysqladmin -u root -ptmppassword processlist 8) Create MySQL database mysqladmin -u root -ptmppassword create testdb 9) Delete database mysqladmin -u root -ptmppassword drop testdb 10) Shutdown the MySQL server mysqladmin -u root -ptmppassword shutdown 11) Kill MySQL client process mysqladmin -u root -ptmppassword kill 20 (20 is the process id with the process list) mysqlshow command 1) Show all the databases mysqlshow -u root -ptmppassword 2) Show the tables on a database mysqlshow -v -v -u root -ptmppassword mydb_name
hdparm switches explained http://manpages.ubuntu.com/manpages/intrepid/man8/hdparm.8.html First of all you have to install hdparm in linux. apt-get install hdparm #hdparm /dev/sda /dev/sda: readonly = 0 (off) readahead = 120 (on) geometry = 8850/255/63, sectors = 142182912, start = 0 Hard disk Performance Information # hdparm -tT /dev/hda /dev/hdd: Timing cached reads: 496 MB in 2.00 seconds = 247.42 MB/sec Timing buffered disk reads: 60 MB in 3.03 seconds = 19.81 MB/sec Hard drive set to low, slow settings # hdparm -cuda /dev/hda /dev/hda: IO_support = 0 (default 16-bit) unmaskirq = 0 (off) using_dma = 0 (off) readahead = 256 (on) Use below tweaks to increase disk read write performance. For sda drive ~]# hdparm -a 2048 /dev/sda /dev/sda: setting fs readahead to 2048 readahead = 2048 (on) For sdb drive [root@439298a ~]# hdparm -a 2048 /dev/sdb /dev/sdb: setting fs readahead to 2048 readahead = 2048 (on) ]# echo “anticipatory” >...
Comments
Post a Comment