Archive for the ‘MYSQL’ Category

Fixed: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’

Saturday, January 28th, 2012
Fixed: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’

If you are new to installing mysql server you might probably face this error quite often if you type mysql in the shell prompt. > mysql ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ To fix: First start the mysql daemon, then type mysql > mysql_safe then > /etc/init.d/mysqld start > [...]

Create new MySQL user on all Linux

Friday, August 26th, 2011
Create new MySQL user on all Linux

Nowadays security is more and more important even in case of smaller websites. As a lot of site uses some database so this is one point where we can make some improvements. In this article we will work with MySQL on our goal is to create a new user in the database. There are more [...]

How to install LAMP (Apache, PHP and MySQL in Linux) on CentOS?

Wednesday, August 17th, 2011
How to install LAMP (Apache, PHP and MySQL in Linux) on CentOS?

Many friends ask me how to install LAMP (Linux, apache, php, mysql). There are many ways to install LAMP. Here i teach you the most easiest way to install LAMP using yum program in CentOS. Below are the steps to install LAMP (Apache, PHP and MySQL in Linux) using Yum:- Go to CentOS and download [...]

How To Check Which Stored Procedures Or SQL Commands Are Running On SQL Server

Tuesday, July 5th, 2011
How To Check Which Stored Procedures Or SQL Commands Are Running On SQL Server

In Microsoft SQL Server, there is a tool called SQL Server Profiler which allow to capture and see which Stored procedures or SQL statements are called or submitted to your SQL Server. It’s very useful while you’re developing your application in debugging mode on your staging environment or to see which Commands are affecting your [...]

Capture And Display Execution Time Of SQL Query In SQL Server

Tuesday, July 5th, 2011
Capture And Display Execution Time Of SQL Query In SQL Server

This tutorial proposes 3 ways in order for you to get the Execution time of SQL Query or Stored Procedures are called or submitted to your SQL Server. They will give you durations in microseconds and base on the execution time, you may have a deeper understand and will do some optimization for your database [...]

Where MySQL Data Dir And Innodb Data Home Dir Location

Tuesday, July 5th, 2011
Where MySQL Data Dir And Innodb Data Home Dir Location

I’m going to move my current MySQL server to another server so I have to backup all my current databases. One important step I need to do is check to see how data files for both MyISAM and InnoDB Storage Engines are stored by taking a look at the datadir and innodb data home dir [...]

How To Tune And Optimize MySQL Performance With MySQLTuner

Tuesday, July 5th, 2011

MySQLTuner is a Perl script that helps to analyzes your current MySQL configuration and give some recommendations to adjust your settings to increase the performance and stability. The MySQLTuner output is separated into 5 parts as below: General Statistics Storage Engine Statistics Security Recommendations Performance Metrics Recommendations You should go through all parts especially on [...]