Can’t connect to MySQL server on ‘server’ (10061) Error

After installing MySql server on a Linux machine (Debian 5) I got this error message when trying to connect to the Mysql server using Mysql administrator.

When trying to fix the problem and searching the Internet I found out that the problem is easy then what it looked.

By default Mysql server only allows the local host to access the Mysql server.

To fix the problem all we need to edit the mysql config file and add the mysql external ip address to accept connection from (not the localhost)
We add another bind-address entry to the config file.

Follow the steps below to fix the problem:

vi /etc/mysql/my.cnf   – edit the my.cnf file
bind-address            =192.168.100.22         — this is the Mysql server ip address.

Save the file and restart the mysql service:
/etc/init.d/mysql restart.

Linux Server Monitoring Commands – P1

This is the first part of linux server \ network monitoting commands:

The following commands can be used as a morning checks commands.

Top – show all process

Free –show free memory
iostat — I\O monitoring
ps -ef – check running proccess
ps – check proccess 
route -n  – Show the kernel routing table

netstat – displays network connections,

route – display network routes

df – show HDD free space status

How to Expand virtual disk in Vmware Server,Workstation, GSX and ESX.

To expand / resize a virtual disk on a virtual machine (e.g C: drive) you need to use the
vmware-vdiskmanager utility in Windows or in linux and 3rd party software like partition magic.

 To expand / resize a virtual disk on a virtual machine (e.g C: drive) you need to use the
vmware-vdiskmanager utility in Windows or in linux and 3rd party software like partition magic.

To use vmware-vdiskmanager command:

Command:
vmware-vdiskmanager -x 40GB myDisk.vmdk

Step 1:
Open the shell command or the Dos command prompt then go to the location of the vmware-vdiskmanager utility.

Directory Location:

cd usr/bin (Llocation in linux Red Hat andCentos)

cd C:Program FilesVMwareVMware server (location in windows systems)

Step 2:
To expand the disk type (Linux systems):

Linux systems:

vmware-vdiskmanager -x 12GB “/home/ftp1/2003 Enterprise Edition /Windows Server 2003.vmdk”

Windows Systems:

vmware-vdiskmanager -x 12GB “c:virtual machinesWindows Server 2003 Enterprise Edition-cl2.vmdk”

Step 3:

After the operation completed , log on to the server and use 3rd party software to resize the drive.

Note: you need to type the size of the disk after you add the extra space to it.
For example if the C: drive is 8GB and you want to add 4GB you need to type –X12GB and not 4GB.

For more information go to:
http://www.vmware.com/support/ws45/doc/disks_vdiskmanager_eg_ws.html

Change Squid Proxy Listening Port

When installing Squid Proxy server sometimes there is a need to change the squid server Listening proxy port number.

By default Squid server listen on port 3128.

When there is a need to change the listening port follow this document.

  1. Log into Squid Server
  2. Go to /etc/squid/squid.conf

use Vim editor to change the port number in the squid config file to and save the config file.
Restart the Squid service.

 

To use the Vim editor see:
http://www.tuxfiles.org/linuxhelp/vimcheat.html

How To Rename A File In VMware ESX Server

In order to rename VM file or a folder in ESX server we need to use a coomand as ESX server is builld on Linux core.

To do so:

Open an SSL connection to ESX server using Putty or a diffrent software.

Go to the file that you want to change.

Use cd foldername to navigate to the file

Use ls to view the files inside the folder

When reaching to the right folder use the command

mv oldfilename newfilename