Softaculous


Topic : Password - MySQL database


Posted By: emaloi on March 21, 2017, 3:49 pm
Hello,

I installed Moodle (version 2.9) using Softaculous. The process has automatically created a new MySQL database. I received an email which outlines the hostname, username and dbname. The password is encrypted. I would like to find out this password. How can I do?

It would be fine to change it. However, I tried to change the password using the MySQL database in the area CPannel but nothing works any more if I do so. Using CPannel or Filezilla, where can I check which is my password?

Thank you!
Ema

Posted By: emaloi on March 21, 2017, 4:45 pm | Post: 1
Thank you guys,

I found the database password by following these instructions: http://www.softaculous.com/docs/How_to_edit_an_installation

However, if you use this code to connect to the database, it gives me an error... how is that possible?

$config = parse_ini_file('/config.ini');

// Connect to database

    $mysqli = new mysqli($config['servername'], $config['username'], $config['password'], $config['dbname']);

    printf("\n ".date("Y-m-d h:i:sa") . " - Establishing connection to " . $config['dbname'] . " on " . $config['servername'] . ".\n");

    // Check connection

    if ($mysqli->connect_error) {

        die('Error : (' . $mysqli->connect_errno . ') ' . $mysqli->connect_error);

        printf("\n ".date("Y-m-d h:i:sa") . " - Connection failed. Returned error: " . mysqli_connect_error() . "\n");

    } else {

        printf("\n ".date("Y-m-d h:i:sa") . " - Connection successful.\n");

    }


The error that is reported to me is this: Establishing connection to on. Error: (Access denied for user 'root' @ 'localhost' (using password: NO)) Access denied for user 'root' @ 'localhost' (using password: NO)

Anyone have any ideas? I am completely blocked ...

Posted By: VitorPereiraaa on March 21, 2017, 11:31 pm | Post: 2
Hi friends, can't find the backup option and i need that to make my backups for safety! anyone can help me on that?

http://imgur.com/a/9mfCJ



Very thankz;))


Posted By: Brijesh on March 23, 2017, 2:11 pm | Post: 3
Quote From : emaloi March 21, 2017, 4:45 pm
Thank you guys,

I found the database password by following these instructions: http://www.softaculous.com/docs/How_to_edit_an_installation

However, if you use this code to connect to the database, it gives me an error... how is that possible?

$config = parse_ini_file('/config.ini');

// Connect to database

    $mysqli = new mysqli($config['servername'], $config['username'], $config['password'], $config['dbname']);

    printf("\n ".date("Y-m-d h:i:sa") . " - Establishing connection to " . $config['dbname'] . " on " . $config['servername'] . ".\n");

    // Check connection

    if ($mysqli->connect_error) {

        die('Error : (' . $mysqli->connect_errno . ') ' . $mysqli->connect_error);

        printf("\n ".date("Y-m-d h:i:sa") . " - Connection failed. Returned error: " . mysqli_connect_error() . "\n");

    } else {

        printf("\n ".date("Y-m-d h:i:sa") . " - Connection successful.\n");

    }


The error that is reported to me is this: Establishing connection to on. Error: (Access denied for user 'root' @ 'localhost' (using password: NO)) Access denied for user 'root' @ 'localhost' (using password: NO)

Anyone have any ideas? I am completely blocked ...


Hi,

It seems the database login details in the config.ini is incorrect. Softaculous creates a database user separately for each user and does not use the root MySQL user. As per the error message it seems you are trying to login as the root MySQL user. You can find the database name and database user as well from the edit installation page.

Also in Moodle the database login details are stored in config.php in the path where you have installed Moodle.


-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool

Posted By: Brijesh on March 23, 2017, 2:13 pm | Post: 4
Quote From : VitorPereiraaa March 21, 2017, 11:31 pm
Hi friends, can't find the backup option and i need that to make my backups for safety! anyone can help me on that?

http://imgur.com/a/9mfCJ



Very thankz;))


Hi,

It seems your web host has disabled backups and restore option in Softaculous on your server. You will need to confirm with them if they have disabled it for a reason.

Some hosts disable it if they perform serverwide backups using some other backup utility.


-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool

Powered By AEF 1.0.8 © 2007-2008 Electron Inc.