Azazia Software Knowledgebase
Search:     Advanced search
Browse by category:
Contact Us

Using an alternate MySQL user account other than the MySQL root user with Data Center Audit (DCA)

Add comment
Views: 597
Votes: 0
Comments: 0
Posted: 28 May, 2009
by: Patridge B.
Updated: 28 May, 2009
by: Patridge B.
It is not a requirement to use the MySQL root user for DCA.

Assuming you already have the database installed and DCA is operational, however you wish to use a non-root account for general operation, then you may do the following.

mysql -u root -p
password: ******
mysql> show databases
dca
mysql
users
mysql> grant insert,update,create,drop, select  on dca.* to dcadbuser@'%' identified by 'dcapassword;
mysql>flush privileges;
mysql>show grants for dcadbuser

+-------------------------------------------------------------------------------------------------+
| Grants for dcadbuser@%
+-------------------------------------------------------------------------------------------------+
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE ON `dca`.* TO 'dcadbuser'
mysql>



Now you can test by running creating the following test file and bringing it up in your web browser.
<?
$user="dcadbuser";
$dbhost="localhost";
$password="dcapassword";
$database = "mysql";
$connection = mysql_connect($dbhost,$user,$password) or die ("couldn't connect to server");
$db = mysql_select_db($database,$connection) or die ("couldn't connect to database");
?>

If you do not receive any errors then your account creation was successful and you can edit the

dca_db.php and enter the above values.


Others in this Category
document Obtaining the maximum value in a numerical list of data in a mysql table
document How to Change a mysql userid password if the password is blank ( an empty space or carriage return)
document I have run the installer however it says it will not connect to the database (unable to connect to database).
document How do I manually create the DCA MySQL Database and Tables on Windows?
document How to verify I have the mysql password set prior to installation on a Windows Machine
document mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in



RSS