Jump to content


Photo

Acesso Negado Para O Usuário 'Odbc'@'Localhost'


  • Faça o login para participar
Nenhuma resposta neste tópico

#1 DaRuller

DaRuller

    Novato no fórum

  • Usuários
  • 1 posts
  • Sexo:Não informado

Posted 21/06/2010, 11:03

Boa tarde.
Eu criei uma base de dados e a respectiva coneccção a ela.. mas quando tento abrir a pagina dá-me este erro...

Warning: mysql_connect() [function.mysql-connect]: Acesso negado para o usuário 'ODBC'@'localhost' (senha usada: NÃO) in C:\Arquivos de programas\EasyPHP5.2.10\www\index.php on line 8

deixo aqui o meu código.. espero que chegue para me ajudarem.

Obrigado

<?
//filename _settings.php
$db_user="Root";
$db_pass="";
$mysql_db="test";
$mysql_db_cron="stats";
?>
______________________________________________________________________________
settings:
<?
include("_settings.php");
$dbh=mysql_connect("localhost", $db_user, $db_pass) or die('I cannot connect to the database because: ' . mysql_error());
mysql_connect("localhost", $db_user, $db_pass) or die('I cannot connect to the database because: ' . mysql_error());
mysql_select_db($mysql_db);
..
____________________________________________________________
index.php

<?php
//include("ref/config.php");
//include("ref/log.php");
include("_settings.php");

define('FB_PATH', '/var/www/vennezia/required/facebook-platform/php/');

mysql_connect("localhost",$db_user,$db_pass);
mysql_select_db($mysql_db);
$select = mysql_query("SELECT `id` FROM `[users]` WHERE `online_mail`+'900'>".time());
$online=@mysql_num_rows($select);
mysql_close();

if(!(@mysql_connect("localhost",$db_user,$db_pass) && @mysql_select_db($mysql_db))) {
print('
<html>
<head>
<title>Lavidaloca - Error</title>
<link rel="stylesheet" type="text/css" href="css-v1.css">
</head>
<table class="thinline" width="40%" align="center">
<tr><td background="images/topic2.jpg"><b>Error</b></td></tr>
<tr><td bgcolor="#000000" height="2"></td></tr>
<tr><td>Unable to connect to database, refreshing this page usually works.</td></tr>
</table>
</html>
');
exit();
...
________________________________________________________________-
please help me..
DaRuller@hotmail.com




1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq