[collectd] ASK: Enable plugin MySQL in collect
Fabian Wenk
fabian at wenks.ch
Fri Jun 1 15:25:57 CEST 2012
Hello
On 09.05.2012 10:24, Kinh Vân Bộ wrote:
> But I can enable plugin MySQL, I uncomment some lines in file config
> collectd.confg and restart collectd (/etc/init.d/collect restart)
>
>> LoadPlugin mysql
>>
>> <Plugin mysql>
>> <Database "my_database">
>> Host "localhost"
>> User "user"
>> Password "password"
>> Port "3306"
>> Socket "/var/run/mysqld/mysqld3.sock"
>> </Database>
>> </Plugin>
>>
>> After i access my collectd, but plugin MySQL's not appearance so I hope
> your support, it'll help me out. Thank you.
For the MySQL Plugin to work, you need to create a user in MySQL.
This can be done with this commands (replace <password> with a
random string of letters and numbers):
mysql -u root -p
mysql> create user 'collectd'@'localhost' identified by '<password>';
mysql> exit
If you want to monitor the whole MySQL server (and not only a
single database on that server) then you can use this in the
collectd.conf (again, replace <password> with the same letters
and numbers as you have used above in MySQL, also verify the path
to the Socket):
<Plugin mysql>
<Database "">
Host "localhost"
Socket "/var/run/mysqld/mysqld3.sock"
User "collectd"
Password "<password>"
</Database>
</Plugin>
> And please can I ask one question, when I comment some line and restart
> collect but they still apearance, I don't know why :(, please help me.
If you do disable plugins after they have been in use, collectd
does not remove the already generated *.rrd files. You need to
manually remove them.
bye
Fabian
More information about the collectd
mailing list