Wednesday, November 27, 2013

#1129 - Host is blocked because of many connection errors

#1129 - Host is blocked because of many connection errors


If phpmyadmin is not working because of above error, Here is the solution.

Solution : 1

Restart the mysql
If you are using Ubuntu, Debian or Mint
# service mysql restart
or
If you are using CentOS, fedora or RHEL
# service mysqld restart

Solution : 2

Run the command in the terminal (mysql should be in running state.)
# mysqladmin flush-hosts -h hostname -u username -p

XAMPP : Another web server daemon with ssl is already running

XAMPP ERROR : Another web server daemon with ssl is already running


If you are facing this error, it means your ssl port is already busy.
This is very simple problem and you do not need to change your apache port.

ssl service uses port 443. If you are running a process which is using this port and after that you are starting xampp, xampp doesn't start. The reason is xampp's Apache uses 80 & 443 both ports.

Solution :
Step-1
You need to stop the service which is using port 443.
Step-2
Start the XAMPP.
Step-3
Start that service again.

If you do not know about that service which is using port 443, find it using
# netstat -lnp | grep :443
It will list the service which is using port 443. Now you can stop it.

If you do not know how to stop it, just kill the service using
# killall service-name
I am giving you an example of this.
I am getting this error and I tried to find which service is using port 443. I found it using netstat command and kill it using killall command.

You can kill it using it's pid too.
See the screenshot what I did to solve the problem.

# Click on the screen shot to see the bigger view.


Saturday, November 9, 2013

Linux - Make pen drive as RAM

 Linux - Use a USB drive as RAM

Actually I am going to clear it first that it does not increase your RAM memory, the process is used for improved performance by cpu using increased swap space but it works same as increased RAM.

It increases your swap space of the system according to size of your pen drive. Suppose you have given 2GB swap space in your system and now you use 8GB pen drive for increased swap space, it shows total swap space around 10 GB.

Follow the process to increase performance of your system.

First make sure that your pendrive is empty and there is no necessary data in it otherwise it will be lost.
Find the device name of your pendrive using command

fdisk -l
In my case, it is /dev/sdb1
 
Now unmount the pendrive using

sudo umount /dev/sdb1
Create swap partition using

sudo mkswap /dev/sdb1
Make it enabled using
sudo swapon -p 32767 /dev/sdb1
32767 is the priority,  The maximum priority can be 32767 and the lowest 0.

To see if swap space is increased or not, Run following command
cat /proc/swaps

If you need to take the pendrive out, do the safety removal process using

sudo swapoff /dev/sdb1
Now you can remove your pendrive but it will not be detected, you need to format it in fat32 or NTFS (in any familiar partitions)
Now pen drive will not be detected, format it again in fat32 using

mkdosfs -F32 -v -n "" /dev/sdb1/span>

Now pendrive will be detected again.

Note :
Swapping is necessary for two important reasons. 

First, when the system requires more memory than is physically available, the kernel swaps out less used pages and gives memory to the current application (process) that needs the memory immediately. 

Second, a significant number of the pages used by an application during its startup phase may only be used for initialization and then never used again. The system can swap out those pages and free the memory for other applications or even for the disk cache.