Downgrade to previous version: yum

Sometime yum update just breaks everything. We experienced this, and had to go backup to previous versions.

In RHEL6 and RHEL7 you can run this command:

which will give you a list of transactions ID’s. Now you just need to figure out how far you want to go back in the history, and do the roll back with:

where N is the number of transaction ID.

[root@P1servername01 tmp]# yum history list all
Loaded plugins: product-id, search-disabled-repos, subscription-manager
ID     | Login user               | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
64 | Jon Doe    	| 2017-10-31 16:25 | Install        |    1 EE
63 | Jon Doe      	| 2017-10-31 16:25 | Erase          |    1 EE
62 | root               | 2017-10-31 04:25 | Update         |   10
61 | Ingvar Nielsen    	| 2017-10-21 15:09 | E, I, O, U     |   69 E<
60 | root              	| 2017-10-17 04:25 | Update         |    3 >
59 | root              	| 2017-10-10 04:25 | Update         |    4
58 | Jon Doe    	| 2017-10-04 11:39 | Install        |    1
57 | root              	| 2017-09-26 04:25 | Update         |    6
56 | Tram Trong 	| 2017-09-15 09:37 | E, I, U        |    6
55 | root 		| 2017-09-12 04:25 | E, I, U        |   53 EE
54 | Jon Doe 		| 2017-08-23 12:00 | I, U           |    3 EE
53 | Jon Doe 		| 2017-08-23 11:05 | Install        |    2
52 | root               | 2017-08-22 04:25 | Update         |    2
51 | Ingvar Nielsen 	| 2017-08-19 11:05 | E, I, U        |    9
50 | Jon Doe    	| 2017-08-14 11:57 | Install        |    1

Missing

I had a Ubuntu version 16 running in a virtualbox, and wanted copy text from host to the virtual machine. But it didn’t work. It turns out you need to install the Guest Additions CD image. There is an option from the Devices -> Insert guest additions CD image, but I got then this error message:

Unable to insert the virtual optical disk E:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso into the machine cytomin.

Could not mount the media/drive ‘E:\Program Files\Oracle\VirtualBox/VBoxGuestAdditions.iso’ (VERR_PDM_MEDIA_LOCKED).

Result Code: E_FAIL (0x80004005)
Component: ConsoleWrap
Interface: IConsole {872da645-4a9b-1727-bee2-5585105b9eed}
Callee: IMachine {b2547866-a0a1-4391-8b86-6952d82efaa0}

 

The solution was simple enough, just had to run this command:

sudo apt-get install virtualbox-guest-utils

Mysql / Mariadb performance test

I have to different Linux servers, and wanted to test if one where faster than the other. I   used mysqlslap together with the “time” command in a bash shell.

# time mysqlslap –user=root –password=cat /root/mysql –host=localhost concurrency=50 –iterations=100 –number-int-cols=5 –number-char-cols=20 –auto-generate-sql –verbose

In this way I could get out different values from the server which I could compare.

Benchmark
Average number of seconds to run all queries: 0.007 seconds
Minimum number of seconds to run all queries: 0.006 seconds
Maximum number of seconds to run all queries: 0.024 seconds
Number of clients running queries: 1
Average number of queries per client: 0

real 0m9.390s
user 0m0.085s
sys 0m0.165s

Referance: https://www.digitalocean.com/community/tutorials/how-to-measure-mysql-query-performance-with-mysqlslap