CRM getting error "Could not connect to the database. Please refer to suitecrm.log for details (0)."

Getting database error on the CRM, also when I checked the logs it show “[FATAL] Could not connect to DB server localhost as bn_suitecrm. port 3306: Permission denied”.

What I have already tried:

  1. Restoring permissions with the help of this script: echo ’
    chmod -R 755 /bin /boot /dev /etc/ /home /lib /lib64
    /media /mnt /opt /run /sbin /srv /usr /var

chmod -R 777 /initrd.img /vmlinuz
chmod -R 1777 /tmp
chmod -R 555 /sys
chmod -R 555 /proc
chmod -R 700 /root

’ > fixpermission

chmod +x fixpermission


  1. It is hosted in Google Cloud so I have tried to create an image and deploy in newly created Virtual Machine instance,

  2. I can’t use sudo command getting error “:sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set”
    so using root for it but can’t figure out the paths and directories.

  3. When I am trying any sql commands it gives me “command not found”
    example: Tried “sudo /etc/init.d/mysqld stop” returned “command not found”

Please can someone help me with this as I need to get CRM back asap.
Thank you.


Are you sure that the mysql was installed on your server? I see that you use some version Unix system. Look at documetation about this version.

It isn’t problem this SuiteCRM.