Jump to content
  • 0

help about flux


Question

Posted

i used the official flux cp and it works

but when i used other flux cp themes or flux cp integrated

this message shows

Access denied for user 'root'@'localhost' (using password: YES)

13 answers to this question

Recommended Posts

Posted (edited)

got an error sir

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in/home/reviser/public_html/themes/default/gthemes/playerCap.phpon line 9

Access denied for user 'root'@'localhost' (using password: YES)

this is my playerCap.php

<?php
if (! defined('FLUX_ROOT')) exit;

$host  = $session->loginAthenaGroup->connection->logsDbConfig->Hostname();
$username  = $session->loginAthenaGroup->connection->logsDbConfig->getUsername();
$password  = $session->loginAthenaGroup->connection->logsDbConfig->getPassword();
$db    = $session->loginAthenaGroup->connection->logsDbConfig->getDatabase();
$link = mysql_connect($host, $username, $password) or die(mysql_error());
@mysql_select_db($db,$link);
$sql = "SELECT COUNT(`char`.char_id) AS total FROM {$server->charMapDatabase}.`char` ";
if (Flux::config('HideTempBannedStats')) {
$sql .= "LEFT JOIN {$server->loginDatabase}.login ON login.account_id = `char`.account_id ";
$sql .= "WHERE login.unban_time <= UNIX_TIMESTAMP()";
}
if (Flux::config('HidePermBannedStats')) {
if (Flux::config('HideTempBannedStats')) {
 $sql .= " AND login.state != 5";
} else {
 $sql .= "LEFT JOIN {$server->loginDatabase}.login ON login.account_id = `char`.account_id ";
 $sql .= "WHERE login.state != 5";
}
}
$result = mysql_query($sql,$link);
mysql_close($link);
$arr = mysql_fetch_array($result);
$player_cap = $arr['total'];
?>
<p id="playerCap"><?php echo $player_cap; ?></p>

Edited by glemor123
Posted

Try to be specific in this part. Just change those value.

$host  = '127.0.0.1';
$username = 'root';
$password  = '';
$db   = 'db_name';

Posted

Try to grant the flux CP table from the MySQL,

CLI:

GRANT SELECT, INSERT, DELETE ON `FluxCP database name / schema name` TO root@'localhost' IDENTIFIED BY 'the password for root password';

Then, do:

 FLUSH PRIVILEGES; 

Have a nice day!

Posted

hello, glemor123

Thank you for giving me the link. I've tried it too and it works perfectly on me..

Maybe, you want to consider reinstalling your fluxCP by re-pasting your fluxcp-renewal.rar to your htdocs and try to use 'ragnarok' (or whatever your Ragnarok Server use to connect to your SQL database) as your FluxCP Username, instead of root.

Have a nice day!

Posted

hello, glemor123

Thank you for giving me the link. I've tried it too and it works perfectly on me..

Maybe, you want to consider reinstalling your fluxCP by re-pasting your fluxcp-renewal.rar to your htdocs and try to use 'ragnarok' (or whatever your Ragnarok Server use to connect to your SQL database) as your FluxCP Username, instead of root.

Have a nice day!

i already tried that many times but still the problem occur

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...