MEM Agent

Check

/etc/init.d/mysql-monitor-agent status

Start

/etc/init.d/mysql-monitor-agent start

Stop

/etc/init.d/mysql-monitor-agent stop

Restart

/etc/init.d/mysql-monitor-agent restart

Update Password

su mysql -s /bin/bash -c "/mysql/mysql-agent/bin/agent.sh --agent-user=agent_user"

Install

ZIPFILE=V1006563-01.zip # 8.0.23ZIPFILE=V1008879-01.zip # 8.0.24ZIPFILE=V1018148-01.zip # 8.0.27ZIPFILE=V1018523-01.zip # 8.0.28ZIPFILE=V1018804-01.zip # 8.0.29

Create Agent User

mysql -u root -p

CREATE USER 'agent_user'@'localhost' IDENTIFIED BY RANDOM PASSWORD;

GRANT SELECT, CREATE USER, REPLICATION CLIENT, SHOW DATABASES, SUPER, PROCESS
  ON *.*
  TO 'agent_user'@'localhost';

GRANT CREATE, INSERT
  ON mysql.*
  TO 'agent_user'@'localhost';

Run Agent Installer

cd /mysql
mkdir /mysql/agent-stage
mv ${ZIPFILE} /mysql/agent-stage
cd /mysql/agent-stage
unzip ${ZIPFILE}

chmod u+x *.bin

./mysqlmonitoragent-8.0.23.1314-linux-x86-64bit-installer.bin   # 8.0.23
./mysqlmonitoragent-8.0.24.1327-linux-x86-64bit-installer.bin   # 8.0.24

./mysqlmonitoragent-8.0.29.1359-linux-x86-64bit-installer.bin # 8.0.29

NOTE: If DISPLAY is set, then a GUI installer will launch, otherwise a text based installer will launch. These instructions assume no GUI.

MySQL Enterprise Monitor Options

e.g. you might want to group MySQL Servers together by application, or location

cd /mysql

rm -rf /mysql/agent-stage







UNIX Domain Sockets are considered more efficient and more secure than TCP/IP and should, therefore, be used where possible.

Uninstall

As root...

cd /mysql/mysql-agent

./uninstall

Upgrade

V1006563-01.zip = Version 8.0.23V1008879-01.zip = Version 8.0.24V1018148-01.zip = Version 8.0.27V1018523-01.zip = Version 8.0.28ZIPFILE=V1018804-01.zip # 8.0.29

Copy the MEM Agent zip file to a suitable location (e.g. /u01/img/MEM/8.0.28/agent) and unzip...

cd /u01/img/MEM/agent8.0.28

unzip V1018523-01.zip

chmod u+x *.bin

./mysqlmonitoragent-8.0.28.1358-linux-x86_64-update-installer.bin

NOTE: If DISPLAY is set, then a GUI installer will launch, otherwise a text based installer will launch. These instructions assume no GUI.

Troubleshooting

See logs in:

/mysql/mysql-agent/logs

If the agent fails to report into MySQL Enterprise Monitor after restart...

Connect to the agent_user via the mysql CLI on the same server as the agent...

mysql -u agent_user -p

The issue should disappear soon after you have done this.
MEM Agent Failed To Connect With Error "Connect Access denied for user [username]" After Restart (Doc ID 2859703.1)

Bibliography

https://dev.mysql.com/doc/mysql-monitor/8.0/en/mem-install-agent.htmlhttps://dev.mysql.com/doc/mysql-monitor/8.0/en/mem-agent-rights.htmlhttps://dev.mysql.com/doc/mysql-monitor/8.0/en/mem-install-agent-gui-ref.htmlhttps://dev.mysql.com/doc/mysql-monitor/8.0/en/mem-starting-agent-unix.html
https://support.orracle.comExecuting agent.sh With "su mysql" Immediately Exit (Doc ID 2665231.1)How to Change the MySQL Enterprise Monitor Agent Service Manager Password; MEM (Doc ID 1965005.1)MEM Agent Failed To Connect With Error "Connect Access denied for user [username]" After Restart (Doc ID 2859703.1)