Posts

Showing posts from January, 2019

error 18 at 0 depth lookup: self signed certificate

I was trying to test SSL connection between MySQL client and server. For that I created SSL certificate and keys by following the MySQL documentation at: Creating SSL Certificates and Keys Using openssl After finishing up all the commands when I verify the certificates by using: openssl verify -CAfile ca.pem server-cert.pem client-cert.pem I got the following output: error 18 at 0 depth lookup : self signed certificate error server-cert.pem: verification failed client-cert.pem: OK  Reason : The Common Name value used for the server and client certificates/keys must each differ from the Common Name value used for the CA certificate. Otherwise, the certificate and key files will not work for servers compiled using OpenSSL. Solution : When OpenSSL prompts you for the Common Name for each certificate, use different names. Common Name (e.g. server FQDN or YOUR name) []: I used values as follows: CA Cert:  ssl-ca-cert Server Cert: ssl-ca-server-cert Client Cert:  ssl-c

General Quotes

A list of quotes from my own experiences and other sources. It is not about Remembering 100%, It is about Understanding 100%. Be Better Everyday. Great stories are not written, they are made. The power of a system is dictated by the knowledge of its creator.  Past is a history, Future is a mystery. But present is a gift. Give me the Wings and I will Fly, Give me a Chance and I will Try. Sometimes High and sometimes Low, the Nature of the Water is to keep its Flow.

Indexing and Slicing in Python

Indexing and Slicing are basic operations in Python with the help of which you can extract items from inside of an ordered sequence. Because strings are defined as ordered sequence of characters, we will use them to explain the operations. The knowledge gained here will apply to other ordered sequences in python like lists. To extract the items, you need to provide positional offset into the sequence. The offset start at 0 from left and at -1 from right. S = 'Python' P y t h o n 0 1 2 3 4 5 -6 -5 -4 -3 -2 -1 Indexing In Python, individual character in a string can be fetched by indexing - providing the numeric offset of the desired component in square brackets after the string. You get back the one character string at the specified position. >>> S[3],S[-2] ('h', 'o') Technically, a negative offset is added to the length of a string to derive a positive offset. More mathematically minded

Why mutexes are required in MySQL

What is a mutex? In computer programming, a mutex (mutual exclusion object) is a program object that is created so that multiple threads in the application can take turns sharing the same resource, such as access to a file. Typically, when a program is started, it creates a mutex for a given resource at the beginning by requesting it from the system and the system returns a unique name or ID for it. After that, any thread needing the resource must use the mutex to lock the resource from other threads while it is using the resource. If the mutex is already locked, a thread needing the resource is typically queued by the system and then given control when the mutex becomes unlocked (the thread that will get the mutex depends upon the thread scheduling algorithm applicable to the mutex context in question). This is needed to avoid race condition and to employ synchronization among threads to keep the database system consistent all the time. What is a Race Condition? A race conditio
Back To Top