One day I faced issue with mysql.sock file. I solved the issue with following commands. [root@localhost ~]# mysqladmin -u root shutdown mysqladmin: connect to server at ‘localhost’ failed error: ‘Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)’ Check … Continue reading
Category Archives: MySql
How to create mysql user and grant all permission
When we do the fresh installation of Mysql we got the root user without any password. Keeping and using the root user for application is not safe. For creating new user use the following commands.
Solved issue: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock
[root@localhost ~]# mysqladmin -u root shutdown mysqladmin: connect to server at ‘localhost’ failed error: ‘Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)’ Check that mysqld is running and that the socket: ‘/var/lib/mysql/mysql.sock’ exists! Using following command I checked … Continue reading
How optimize the all tables using php script
Optimizing tables is very necessary for database. That will improve the your website performance. Optimize command is helpful to manage database files in right manner. This command will optimize the size of file size of database files. If you want … Continue reading
mysql sleep processes issue solved
I faced the sleep query issue sometimes. Many times that kills the server. When ever you are using dedicated virtual hosting server that time you need to me very careful how you are setting up the apache and mysql. I … Continue reading
How to check the mysql logs for select queries
As a developers need to check the mysql logs. Many times for any request how many mysql queries are running or executed we need to know. In this tutorial I will show you how to created mysql log file for … Continue reading
How to use mongodb with php
If you want to use the mongodb with php then you need to install pecl libraries. Mongo extension is not bundled with PHP. For installing the Mongo use following URL: If you dont have pecl installed on your linux machine … Continue reading
How to install Mongodb on linux
Before installing the Mongodb on linux box you need to install following packages on box. For 32bit user use following command For 64bit use following command Mongo stores database in data/db folder. so we need to create those folder using … Continue reading
How to install the Mysql workbench on Fedora
You can use following commands for installing the Mysql workbench on Linux system. Mysql workbench is very nice tool for creating the ER diagram on mysql database. I personaly like that tool so much. [root@sonyk-pc sony]# rpm -Uvh remi-release-11.rpm warning: … Continue reading
Find the largest tables on MySQL Server
Using following article You can find the largest tables from Mysql database. Finding largest tables on MySQL instance is no brainier in MySQL 5.0+ thanks to Information Schema but I still wanted to post little query I use for the … Continue reading






