With SQL DM for MySQL installed on your server, you can begin to configure systems and databases in your infrastructure for its use.
Use SQL DM for MySQL to monitor a server, only grant its user access to MySQL and then register the server through the Web UI.
When you register a server with SQL DM for MySQL, it collects information and monitors the server's health through standard MySQL client connections. You need to configure a user account with the appropriate permissions on each MySQL server you want to monitor. Fully enabling SQL DM for MySQL requires that you grant
SUPER to this user. You can use whatever username you find convenient, with the host set to the server hosting SQL DM for MySQL.
For instance, say you have installed SQL DM for MySQL on a server at 192.168.1.150 and that you would like use the user
monyog as the user name. To fully enable SQL DM for MySQL in this scenario, you would issue the following command:
Granting these permissions makes the MySQL server fully accessible to SQL DM for MySQL. To actually start collecting data on this server you also need to register it with the application.
Running SQL DM for MySQL as unprivileged user
By default, SQL DM for MySQL runs under the 'root' account in Linux. This may be a security nightmare for some.
Here's how you can create and use a user account exclusively for running SQL DM for MySQL:
- First add a new user and group; replace <GID>, with the group ID, and <PASSWORD>:
Copy the original files to the new location and change the file ownership.
Next, we need to change the initialization script. Be sure to make a backup first!
Change the following lines for the new path.
In the same file, you also need to update the start command to the following.
Now you need to alter the configuration file.
Change the data path to the new directory.
After this you should be able to start SQL DM for MySQL running as an unprivileged user.