Thursday, 23 August 2018

Recover your MYSQL database if nothing works in Ubuntu/Linux.

Recently I stuck in a situation where after spending many days I couldn't resolve the my MYSQL database connectivity in my Ubuntu system. Although I tried many solutions available on the Internet, but I was unable to resolve it.

Rather than solving my problem I thought that I have made the situation more worst then earlier because of my many hit and try on the server. However, I read at many location to keep a backup of my databases. So I was saved /var/lib/mysql directory it somewhere else.

After no success, I tried to restore databases from my mysql backed up the directory in Ubuntu after a fresh installation of MYSQL database server.

So I was copied /val/lib/mysql folder before a new installation of MYSQL. After successful installation of MYSQL server I tried to restore all my databases in  new MYSQL server like this -

Open a terminal and copy/restore your saved database to MYSQL server using the command-
(I have saved my database to Desktop and database name is itcentre)

sudo cp -r Desktop/mysql/itcentre /var/lib/mysql

enter your sudo password

after coping your database file also copy these files of your /var/lib/mysql folder to the server



sudo cp  Desktop/mysql/ibdata1 /var/lib/mysql
sudo cp  Desktop/mysql/ib_logfile0 /var/lib/mysql
sudo cp  Desktop/mysql/ib_logfile1 /var/lib/mysql
sudo cp  Desktop/mysql/debian-5.7.flag /var/lib/mysql

sudo chown -R mysql:mysql /var/lib/mysql


if there is no error your database is successfully restored to MYSQL server.


Good luck !!!

Saturday, 18 August 2018

Emulator: emulator: ERROR: x86 emulation currently require hardware acceleration!

In the continuation of previous posts, this post is also a solution of one of the Android Studio error face by newbie on this platform.


This kind of error found when Intel x86 Emulator Accelerator (HAXM Installer) is not installed in your system or if there is any problem in it.

So, to install this go to -

Tools ----> Android ----> SDK Manager  the click on SDK Tools ,  You will see that  Intel x86 Emulator Accelerator (HAXM Installer)  is not installed, just tick the box and then click on Apply.





If again problem exist, please check that virtualization is enabled or not in your system BIOS.







Saturday, 4 August 2018

Removing password complexity in Windows server 2016.

Sometimes we don't to impose password complexity when want to create a new user in Windows Server. So how can remove it for using simple password, however it is recommended that you should keep password that should meet the password complexity for security purpose on servers.

So in Windows server like 2016 it gives error when it does not meet the password complexity like this-

or like this -


So how can we remove this restriction from server?

Press Window key  + r or open run window and type gpedit.msc then press Ok.


A group policy editor window will be opened.

Go to under Computer Configuration ------>Windows settings ----------> Security settings (double click on Security settings).

In the right pane you will see Account Policies, open it.

When you open Account Policies you will see Password Policy, open it or just double click.
You will see that "Password must meet complexity requirements" policy property is Enabled.
Double click on this property and disable it.



Now you are free to use any kind or any length of your password in Windows server 2016.









Change image source dynamically on hyperlink

 Changing image source dynamically using JQuery. Here in this example I have created there hyperlink and stored all images in the same folde...