<commit_before># MySQL plugin for New Relic
[Find the New Relic MySQL plugin in the New Relic storefront](https://rpm.newrelic.com/plugins/new_relic_mysql/52)

[Find the New Relic MySQL plugin in plugin central](https://rpm.newrelic.com/extensions/com.newrelic.plugins.mysql.instance)

----
**Your New Relic MySQL plugin can be operational in 2 minutes when following these steps.**

----
## Prerequisites
The MySQL plugin for New Relic requires the following:

- A New Relic account. Signup for a free account at http://newrelic.com
- A server running MySQL Version 5.0 or greater. Download MySQL for free at http://dev.mysql.com/downloads
- A configured Java Runtime (JRE) environment Version 1.6 or better

## Download
Download and unpack the New Relic plugin for MySQL from Plugin Central: https://rpm.newrelic.com/plugins/
The following instructions can be used on Linux systems.

    $ mkdir /path/to/newrelic-plugin
    $ cd /path/to/newrelic-plugin
    $ tar xfz newrelic_mysql_plugin*.tar.gz

## Configuring your Agent Environment
The New Relic plugin for MySQL runs an agent process to collect and report MySQL metrics to New Relic. Configure your New Relic license and MySQL databases.

### Configure your New Relic License
Specify your license key in the necessary properties file.
Your license key can be found under Account Settings at https://rpm.newrelic.com see https://newrelic.com/docs/subscriptions/license-key for more help

    $ cp config/template_newrelic.properties config/newrelic.properties
    # Edit config/newrelic.properties and paste in your license key

### Configure your MySQL Properties
Each running MySQL plugin agent requires a JSON configuration file defining the access to the monitored MySQL instance(s). An example file is provided in the config directory.

    $ cp config/template_mysql.instance.json config/mysql.instance.json
    # Edit config/mysql.instance.json

If using your localhost MySQL instance, add your user name and password as well as a meaningful name which will appear in the New Relic user interface for the MySQL instance. Set the value for the "name" attribute to match your MySQL databases purpose, e.g. "Production Master". 

    [
      {
        "name" : "Localhost",
        "host" : "localhost",
        "metrics" : "status,newrelic",
        "user" : "USER_NAME_HERE",
        "passwd" : "<PASSWORD>"
       },
    ]

## Running the Agent
To run the plugin in from the command line: 
`$ java -jar newrelic_mysql_plugin*.jar`
To run the plugin in from the command line and detach the process so it will run in the background:
`$ nohup java -jar newrelic_mysql_plugin*.jar &`

*Note: At present there are no init.d scripts to start the New Relic MySQL plugin at system startup.*<commit_msg>minor formatting edit<commit_after># MySQL plugin for New Relic
[Find the New Relic MySQL plugin in the New Relic storefront](https://rpm.newrelic.com/plugins/new_relic_mysql/52)

[Find the New Relic MySQL plugin in plugin central](https://rpm.newrelic.com/extensions/com.newrelic.plugins.mysql.instance)

----
**Your New Relic MySQL plugin can be operational in 2 minutes when following these steps.**

----
## Prerequisites
The MySQL plugin for New Relic requires the following:

- A New Relic account. Signup for a free account at http://newrelic.com
- A server running MySQL Version 5.0 or greater. Download MySQL for free at http://dev.mysql.com/downloads
- A configured Java Runtime (JRE) environment Version 1.6 or better

## Download
Download and unpack the New Relic plugin for MySQL from Plugin Central: https://rpm.newrelic.com/plugins/
The following instructions can be used on Linux systems.

    $ mkdir /path/to/newrelic-plugin
    $ cd /path/to/newrelic-plugin
    $ tar xfz newrelic_mysql_plugin*.tar.gz

## Configuring your Agent Environment
The New Relic plugin for MySQL runs an agent process to collect and report MySQL metrics to New Relic. Configure your New Relic license and MySQL databases.

### Configure your New Relic License
Specify your license key in the necessary properties file.
Your license key can be found under Account Settings at https://rpm.newrelic.com see https://newrelic.com/docs/subscriptions/license-key for more help

    $ cp config/template_newrelic.properties config/newrelic.properties
    # Edit config/newrelic.properties and paste in your license key

### Configure your MySQL Properties
Each running MySQL plugin agent requires a JSON configuration file defining the access to the monitored MySQL instance(s). An example file is provided in the config directory.

    $ cp config/template_mysql.instance.json config/mysql.instance.json
    # Edit config/mysql.instance.json

If using your localhost MySQL instance, add your user name and password as well as a meaningful name which will appear in the New Relic user interface for the MySQL instance. Set the value for the "name" attribute to match your MySQL databases purpose, e.g. "Production Master". 

    [
      {
        "name" : "Localhost",
        "host" : "localhost",
        "metrics" : "status,newrelic",
        "user" : "USER_NAME_HERE",
        "passwd" : "<PASSWORD>"
       },
    ]

## Running the Agent
To run the plugin in from the command line: 
`$ java -jar newrelic_mysql_plugin*.jar`

To run the plugin in from the command line and detach the process so it will run in the background:
`$ nohup java -jar newrelic_mysql_plugin*.jar &`

*Note: At present there are no init.d scripts to start the New Relic MySQL plugin at system startup.*
{'fraction_non_alphanumeric': 0.07490501176044871, 'fraction_numerical': 0.0025330197213678306, 'mean_word_length': 3.8153310104529616, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5228402', 'n_tokens_mistral': 1552, 'n_tokens_neox': 1469, 'n_words': 677}