Skip to main content


Showing posts from September, 2018

Install MySQL Enterprise Monitor (MEM)

Install MEM (MySQL Enterprise Monitor) for Linux : 01. Download older version of MEM (3.3,3.4,4.0 etc.) from Metallink patchset. 02. Download latest version of MEM (8.0) from e-delivery. 03. Files for MEM 3.3.0 Start | Stop | Check Status MEM agent on node: #/mysql/MEM8.0.3/agent/etc/init.d/ mysql-monitor-agent start # /mysql/MEM8.0.3/agent/etc/init.d/ mysql-monitor-agent stop # /mysql/MEM8.0.3/agent/etc/init.d/ mysql-monitor-agent status Install MySQL Service manager on MEM host: Make sure to install MySQL service manager as a root so that it can start automatically while you re-boot server. Installation files:     Install Service Manager - mysqlmonitor - installer.bin     Upgrade Service Manager - mysqlmonitor - update-installer.bin MySQL service manager will install Apache Tomcat : mandatory component. Servlet container and web server which hosts the MySQL Enterprise Service Manager. Java Runtime Environment (JRE): mandatory

Create MySQL database with hyphen

Create MySQL database with hyphen: If you are trying to create MySQL database with hyphen " - " in the name such as test-db and get error  " your MySQL server version for the right syntax to use near '-db' at line" then you might be wondering how to get it done as your business require MySQL database name with hyphen " - "  Here is the fix, use escape character " ` " before and after database name such as `test-db` and you will be able to create database with hyphen. CREATE DATABASE `test-db`; 

MySQL 8 role based privlileges

MySQL 8 implement role based privileges: If you are wondering about how to implement new features of MySQL 8 about role based privileges. Then here is my 2 cents. It doesn't work like Oracle in which we create role, grant privileges to role, grant role to the user, and you are all set. There are two options available:     01. Activate role at session level, using set role     02. Activate all roles on login globally Role at session level:     SET ROLE is used to modify user's effective privileges in the current session.         SET ROLE DEFAULT;     SET ROLE 'role1', 'role2';     SET ROLE ALL;     SET ROLE ALL EXCEPT 'role1', 'role2';     Activate role globally:   By default activate_all_roles_on_login is OFF, check it by using SELECT VARIABLES LIKE '%activate%';   Execute statement SET GLOBAL activate_all_roles_on_login = ON;      If you are logged in then log out and log in back and user will have the privileges.     In MySQL 8, you