Could not connect to DB server localhost as


I have installed and running instance of SuiteCRM ( 7.8.8 )

When I added

          • cd /home/user/public_html/mycrm; php -f cron.php > /dev/null 2>&1

to crontab nothing happend with workflows (last execution: never)
In log fie I have lines like

Sun Oct 22 09:40:05 2017 [3][-none-][FATAL] Could not connect to DB server localhost as xxxxxxxxxx. port : Access denied for user ‘xxxxxxxxxx’@‘localhost’ (using password: YES)

Any help ?

You added that line to which user’s crontab?

You can read the sections on crontab here:

I’ve added via cPanel.
I have only one cPanel user and as I know there is no possible to have a multiple users.

I’m not sure that message is coming from cron jobs or not. You can do that test by temporarily disabling the cron job and checking if new messages still appear on the log.

Also, please check your database settings in config.php. Your error message seems to indicate there is no port configured.

I’ve tested. Messages comes from cron.

config.php => ‘db_port’ => ‘’,

I just checked and my port is also undefined like yours. It probably just uses a default port.

It’s not usual for the database credentials to work ion the web application, but not in cron jobs, because they share the same config.php and the same DB access classes.

So I am a bit puzzled. Are all your cron jobs failing, or just one?

It’s clean install. I’ve 13 standard processes and for every one “Last Successful Run: Never”

Maybe you can increase your log level a bit and look at what is happening in the cron jobs before that error.

You should also pay attention to php_errors.log, the Apache log.

solved :slight_smile:

          • cd /home/user/public_html/mycrm; php-cli -f cron.php > /dev/null 2>&1

insted of

          • cd /home/user/public_html/mycrm; php -f cron.php > /dev/null 2>&1

database user changed from localhost to IP adress (thanks to my provider)