Jump to content

access denied!!!


bosskax

Recommended Posts

We've got a test server where we view staging pages before they go live. When I view them in the test I get the following error message:

Warning: mysql_connect(): Access denied for user 'mn_webadmin'@'mnsv-henreid.campus.bath.ac.uk' (using password: YES) in D:\www\htdocs\management\_classes\incutioDatabase.class.php on line 55

 

Fatal error: There seems to be a problem with the database. in D:\www\htdocs\management\_classes\incutioDatabase.class.php on line 61

 

i've checked the incutioDatabase.class.php on both lines 55 and 61 and there doesnt seem to be anything weird but then again am not that familiar with php

 

can anyone help me

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/37323-access-denied/
Share on other sites

do you have a solution?

 

heres the cfg.php file..this may or may ot help

 

/* This is where you setup the system */

 

// The path to the root of the app.

$root = $_SERVER['DOCUMENT_ROOT'].'/management';

 

// ignore these two lines

require($root.'/_classes/config.class.php');

$config = new CMSLiteConfig($root);

 

// The base of the URLs. So if the system is in a directory called 'cms', this

// wants to be '/cms/'

// If the system is on the root, leave it as '/'

$config->setUrlBase('/management/');

 

// this is some unique string for the database to identify the site

$config->setSiteName('management');

 

// setup the database details

$config->setDbUser('mn_webadmin');

$config->setDbPassword('********');

//$config->setDbHost('mysqlhost');

//$config->setDbHost('mnsv-henreid.campus.bath.ac.uk');

$config->setDbHost('mysqlhost.bath.ac.uk');

// WHEN FILE IS UPLOADED THIS WILL NEED TO BE SET TO mysqlhost.bath.ac.uk

$config->setDbDatabase('mnWebPages');

 

/* Advanced - Ignore from here unless you know what you are doing */

 

// setup the templates

$config->setDefaultTemplate('page');

$config->addTemplate('./index.html', 'frontpage');

 

// caching - disable by setting to false - useful for debugging but should be set to true when live

$config->setCaching(false);    // switch it off to make the system display pages changed in LDAP,

                            // upload, then switch it back on and upload again

                            // OR EVEN BETTER logon to the database and execute:

                            // truncate table pages;

 

// HTMLTidy - disable by setting to false - useful for debugging but should be set to true when live

$config->setTidy(true);

 

// dynamic content. Setup special cases here

//$config->setSpecialCase('./expertise/directory',    'expertise_directory');

$config->setSpecialCase('./about/people',    'people_directory');

 

$_SERVER['config'] = $config;

 

Link to comment
https://forums.phpfreaks.com/topic/37323-access-denied/#findComment-178984
Share on other sites

$dbhost = "localhost";

$dbuser =  "name";

$dbpass = "password";

$dbname = "bathdata";

$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error Connecting to mysql');

mysql_select_db($dbname);

 

$query = "SELECT * FROM table";

$result = mysql_query($query) or die(mysql_error());

$numrows = mysql_num_rows($result);

 

if ($numrows == 1) {$row = mysql_fetch_assoc($result);}

echo "$row[fieldname]";

 

see if returns any rows

 

Link to comment
https://forums.phpfreaks.com/topic/37323-access-denied/#findComment-180642
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.