|
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) |
|||||
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,$
?> 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. |
|||||
Powered by
KBPublisher (Knowledge base software)