Database connection error "name" "password" etc error

I deployed SuiteCRM via Ansible Playbook. When I access it via IP address and configuring the database it give me an error message (Database connection error “name” “password” etc is wrong). Here is the screenshot:

I have tried with my Server IP and also with localhost IP address etc. but not successful.
this is my playbook:
hosts: all
gather_facts: false
become: yes
vars:
ansible_host: “{{ HOSTIP }}”
ansible_port: “{{ HOSTPORT }}”
ansible_user: student
#ansible_ssh_pass: student

tasks:

  • name: Wait 300 seconds, but only start checking after 60 seconds
    wait_for_connection:
    timeout: 3

  • name: Install PHP and unzip
    apt:
    name:
    - php
    - unzip
    # SuiteCRM requirements
    - php-xml
    # Database
    - mariadb-server
    - php-mysql
    - python3-pymysql

  • name: copy files to /var/www/html
    unarchive:
    src: “{{ CRMZIP }}”
    dest: /var/www/html

  • name: Enable GraphQL API endpoint
    community.general.apache2_module:
    name: rewrite

  • name: Configure DocumentRoot
    ansible.builtin.lineinfile:
    path: /etc/apache2/sites-available/000-default.conf
    line: ‘\1DocumentRoot /var/www/html/public’
    regexp: ‘^(\s+)DocumentRoot /var/www/html$’
    backrefs: yes

  • name: Enable .htaccess
    blockinfile:
    path: /etc/apache2/sites-available/000-default.conf
    insertafter: ‘DocumentRoot’
    block: |
    <Directory “/var/www/html/public”>
    AllowOverride All
    Order Allow,Deny
    Allow from All

  • name: Start Apache2 if not started
    ansible.builtin.service:
    name: apache2
    state: restarted

  • name: Allow root to access from 127.0.0.1
    community.mysql.mysql_user:
    login_unix_socket: /var/run/mysqld/mysqld.sock
    name: student
    host: 127.0.0.1
    priv: ‘.:ALL,GRANT’

  • name: Start MariaDB
    ansible.builtin.service:
    name: mysql
    state: started

  • name: Set output attributes
    set_stats:
    data:
    app_endpoint: “http://{{ HOSTIP }}/”

Hi @Furqan,

Welcome to the community! :tada:

It looks like you using 193.196.143.75 to access the instance, not 193.196.143.75/SuiteCRM which may be your bother

You site URL should likely be https://192.196.143.75/

Let us know if that makes any difference!

Hi @Mac-Rae,
Thanks for your comment.

I tried with https://193.196.143.75, but again same error. Find attached to the comment screenshot.

Is your database hosted on the same instance? and do you specifically have no port?

I’d try localhost, mysql, mariadb etc as the Host Name and
the standard 3306 as the database port

Hi Furqan,

I think the error is in your Database Configuration

In SuiteCRM Database User, you should enter MariaDB Username
In SuiteCRM Database User Password, you should enter MariaDB password.

And in URL of SuiteCRM instance -
Your instance URL should be this: http://193.196.143.75

Also, you missed writing the Database Port number. Please fill all crucial information.

And to know each step properly see this SuiteCRM8

Yes it is hosted on same instace. I didn’t specified any port.

I tried localhost, mysql, mariadb but doesn’t work.

I tried MariaDB Username. I didn’t specified any MariaDB password. I tried admin, root, and random etc. By defaul xampp mariadb server password is blank, no password.

Hi,
You need to set your own password in the MariaDB server. It is compulsory on SuiteCRM 8 to set the database credential.

You also seem to be missing a bunch of php.ini modules, I usually install all these in Ubuntu:

apt install zip unzip php-mbstring php7.3-mbstring php-gettext php7.3-xml php7.3-zip php7.3-imap php7.3-gd php7.3-curl php7.3-intl php7.3-mysql php-gd phpmyadmin 

Of course, these names will be different for different PHP versions. Note that there is a MySQL module there - without that one you won’t be able to reach the database.

Another tip: instead of doing guess work about what could be wrong, keep an eye on both your logs, there are specific error messages pointing you to the issues.

@vijay1992 @Mac-Rae I resolved the database errors. now when I proceed, it doesn’t show anything , just few seconds searching and again the same window. however, i set the values like these
max_execution_time = xx ← try putting 3000
max_input_time = xx ← 3000
max_input_vars = xx <— 10000
memory_limit = xx <— 500M
upload_max_filesize = xx ← 256M