Prroblem with CDR - MySQL

When I instaling the asterisk and runnig I have this messages:

root@unit0 asterisk]# asterisk -d
Parsing /etc/asterisk/asterisk.conf
Parsing /etc/asterisk/extconfig.conf
Parsing /etc/asterisk/logger.conf
Oct 8 15:56:41 NOTICE[7131]: cdr.c:1192 do_reload: CDR simple logging enabled.
Oct 8 15:56:41 ERROR[7131]: res_config_mysql.c:651 mysql_reconnect: MySQL RealTime: Failed to connect database server on (err 2002). Check debug for more info.
Oct 8 15:56:41 WARNING[7131]: res_config_mysql.c:477 load_module: MySQL RealTime: Couldn’t establish connection. Check debug.
Oct 8 15:56:41 NOTICE[7131]: config.c:863 ast_config_engine_register: Registered Config Engine mysql
Oct 8 15:56:41 ERROR[7131]: cdr_addon_mysql.c:437 my_load_module: Failed to connect to mysql database asterisk on localhost.
Instrucci?n ilegal

I see that MySQL do not starts automaticaly, I have to go in /etc/init.d and manualy execute “service mysqld start”.

Can anybody help, please.

Thank you.