Avoid subquery get records with max value for each group of grouped mySQL results

How do you get the rows that contain the max value for each grouped set. I faced issue many times but I ended with following solution of subquery and two queries and using one resultset result in another query. Here is data of Employee table. I want max salary role based..users Employee table Data: Name …

install php mysql apache on centos 7

In this tutorial we are going to tell you how to install php mysql apache on centos 7 with very easy and simple steps and guide. LAMP is becoming more popular these day. Many people are using LAMP for server solutions. Add EPEL-7 to your linux os with latest phpMyadmin. rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm Now install …

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

One day I faced issue with mysql.sock file. I found Can’t connect to local MySQL error. I solved the issue with 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! Solved issue: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock Using following command I checked the mysql directory. [root@localhost …