By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,829 Members | 1,828 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,829 IT Pros & Developers. It's quick & easy.

Can someone help me with a php mysql error I keep getting????

P: n/a
I'm trying to set up an off the shelf script and keep getting an error.

My host set up the mysql on my site and I changed the variables I had to in the
settings.php file but I keep getting the following errors
Warning: mysql_pconnect(): Access denied for user: 'ODBC@localhost' (Using password: NO)
in f:\wwwroot\professionalchef\Back\JobsOnline\mysql. php on line 121

Warning: mysql_pconnect(): Access denied for user: 'ODBC@localhost' (Using password: NO)
in f:\wwwroot\professionalchef\Back\JobsOnline\mysql. php on line 121

Warning: mysql_query(): Access denied for user: 'ODBC@localhost' (Using password: NO) in
f:\wwwroot\professionalchef\Back\JobsOnline\mysql. php on line 325

Warning: mysql_query(): A link to the server could not be established in
f:\wwwroot\professionalchef\Back\JobsOnline\mysql. php on line 325

MySQL error: (1045) Access denied for user: 'ODBC@localhost' (Using password: NO).

My first question would have to be does all this need to be in the root, because it's not,
it's in a subdirectory.

The host said they set up mysql for me but does it have to point to it somewhere?

Any assistance you can give would be greatly appreciated. This is being set up for a non
profit organization

Thanks
Frank
Jul 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Chefry wrote:
Warning: mysql_pconnect(): Access denied for user: 'ODBC@localhost' (Using password: NO)
in f:\wwwroot\professionalchef\Back\JobsOnline\mysql. php on line 121
This normally means that you don't have user called ODBC (without a
password) in your MySQL database. By default there is no such user in
your database, so you have propably tried to add such user. How did you
try to add it?
My first question would have to be does all this need to be in the root, because it's not,
it's in a subdirectory.
No, the location of the php file seems not be causing this error, so it
is propably in correct place.
The host said they set up mysql for me but does it have to point to it somewhere?


Host? Are you telling me that they have created you an account to MySQL
without any password? That is very unsecure, since anyone could access
your tables. Are you sure you have the correct username and are you sure
that it doesn't have a password?
Jul 20 '05 #2

P: n/a
On Mon, 20 Dec 2004 16:03:49 GMT, Aggro <sp**********@yahoo.com> wrote:
Chefry wrote:
Warning: mysql_pconnect(): Access denied for user: 'ODBC@localhost' (Using password: NO)
in f:\wwwroot\professionalchef\Back\JobsOnline\mysql. php on line 121
This normally means that you don't have user called ODBC (without a
password) in your MySQL database. By default there is no such user in
your database, so you have propably tried to add such user. How did you
try to add it?


Nope I haven't tried to add anything
My first question would have to be does all this need to be in the root, because it's not,
it's in a subdirectory.


No, the location of the php file seems not be causing this error, so it
is propably in correct place.
The host said they set up mysql for me but does it have to point to it somewhere?


Host? Are you telling me that they have created you an account to MySQL
without any password? That is very unsecure, since anyone could access
your tables. Are you sure you have the correct username and are you sure
that it doesn't have a password?

They sent me a password, etc which I embedded into the script in (I think) the proper
places.

Here's the script I was using. It's an off the shelf series of scripts to set up an
employment website, which I am doing for a non-profit organization.

I hope you don't mind, but I've blocked out the passwords, etc. The file name is
settings.php
<?phpif
(!$website["set"]){$website["url"]="http://www.professionalchef.com";$website["title"]="Job
Lister";$website["email"]="jo**@professionalchef.com";$website["password"]="*******";$website["mysqlserver"]="localhost";$website["mysqluser"]="**********sql";$website["mysqlpassword"]="********";$website["mysqldatabase"]="********db";$website["prefix"]="";$website["paypal_account"]="pa****@paypal.com";$website["project_cost_buyer"]=8;$website["set"]=1;};?>

The instructions that came with it were as follows

Provided by Fly2.cc

Open settings.php & configure the variables.

Upload all the files to your webserver.
CHMOD ./images and ./files to 777

goto http://yoursite.com/admin_setup.php
and install.

I think I got all the variables and I did the CHMOD

The host server is running NT, according to my FTP program. Would that have anything to do
with it.

I appreciate any assistance you can give me to get this running

Thanks
Frank
Jul 20 '05 #3

P: n/a

goto http://yoursite.com/admin_setup.php


The admin_setup. php is as follows

<?php

require "settings.php";

include("admin.php");

include("aheader");

include("mysql.php");

//$reset=1;

if ($reset)

{

$t1=new mysql_tb($website["prefix"]."members");

$t1->drop();

$t2=new mysql_tb($website["prefix"]."projects");

$t2->drop();

$t3=new mysql_tb($website["prefix"]."bids");

$t3->drop();

$tb=new mysql_tb($website["prefix"]."boards");

$tb->drop();

$tb=new mysql_tb($website["prefix"]."reviews");

$tb->drop();

};

$t1=new mysql_tb($website["prefix"]."members","id int(11) DEFAULT '0' NOT NULL
auto_increment, nick varchar(80) NOT NULL, registered date, password varchar(40), email
varchar(40), url varchar(40), name varchar(30), picture varchar(100), category text,
country varchar(30), state varchar(30), city varchar(30), address varchar(120), telephone
varchar(40), languages varchar(100), details text, payment text, credit float(11,2), type
varchar(80), status varchar(100), PRIMARY KEY (id)");

$t2=new mysql_tb($website["prefix"]."projects","id int(11) DEFAULT '0' NOT NULL
auto_increment, nick varchar(80) NOT NULL, registered date, name varchar(100), min
varchar(20), max varchar(20), days varchar(20), category text, country varchar(30), state
varchar(30), city varchar(30), languages varchar(100), description text, file
varchar(100), winer varchar(80), type varchar(50), status varchar(20), PRIMARY KEY (id)");

$t3=new mysql_tb($website["prefix"]."bids","id int(11) DEFAULT '0' NOT NULL
auto_increment, nick varchar(80) NOT NULL, project varchar(100) NOT NULL, registered date,
amount varchar(20), days varchar(20), description text, type varchar(50), status
varchar(20), PRIMARY KEY (id)");

$tb=new mysql_tb($website["prefix"]."boards","id int(11) DEFAULT '0' NOT NULL
auto_increment, nick varchar(80) NOT NULL, name varchar(100) NOT NULL, target
varchar(100),registered date, description text, type varchar(50), status varchar(20),
PRIMARY KEY (id)");

$tb=new mysql_tb($website["prefix"]."reviews","id int(11) DEFAULT '0' NOT NULL
auto_increment, nick varchar(80) NOT NULL, name varchar(100) NOT NULL, grade varchar(100),
registered date, description text, type varchar(50), status varchar(20), PRIMARY KEY
(id)");

echo "Installed successfully! Please manually delete admin_setup.php !";

include("afooter");

?>
Jul 20 '05 #4

P: n/a
Chefry wrote:
They sent me a password, etc which I embedded into the script in (I think) the proper
places.


Well, I don't know where it has failed, but I know that the script that
provides the error is not using any password and it's using username
ODBC, which is propably not the one you used in the installation.

Basicly this is not an issue with MySQL. It's more about an issue with
the installation script or software you are trying to use. And it is
quite hard try to debug the error without having the access to the
server and without knowing more about the software. And getting familiar
with the software can be quite time consuming.

So I'm suggesting that you find out if the provider of the
script/software provides some sort of support or a place where you can
ask questions. Or perhaps they have a FAQ of some sort.

Sorry that I can't be more of a help.
Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.