Getting ip address using MySQL query
To get the IP address only without the port number.
Select SUBSTRING_INDEX(host,':',1) as 'ip'
From information_schema.processlist
WHERE ID=connection_id();
To get the IP address only without the port number.
Select SUBSTRING_INDEX(host,':',1) as 'ip'
From information_schema.processlist
WHERE ID=connection_id();