473,398 Members | 2,380 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

MYSQL Access problem

g
I have a php scripted that access a mysql database. I use the same
access methods in other scripts and it access it the database fine:

if (!($connection = @ mysql_pconnect($hostName,
$username,
$password)))
showerror();

if (!mysql_select_db($databaseName, $connection))
showerror();
but I have one script were I get the error message:

Access denied for user: '@localhost' to database 'winestore' (# 256).

So is there something else it could be expect the password or user
name???
Jul 17 '05 #1
2 2348
You may try something like this

<?php

$lnk = mysql_connect('localhost', 'mysql_user', 'mysql_password')
or die ('Not connected : ' . mysql_error());

// make foo the current db
mysql_select_db('foo', $lnk) or die ('Can\'t use foo : ' . mysql_error());

?>Database Migration ExpertsSQLPorter(Database migration
toolkit)www.realsoftstudio.com"g" <th********************@yahoo.co.uk> wrote
in message news:20**************************@posting.google.c om...
I have a php scripted that access a mysql database. I use the same
access methods in other scripts and it access it the database fine:

if (!($connection = @ mysql_pconnect($hostName,
$username,
$password)))
showerror();

if (!mysql_select_db($databaseName, $connection))
showerror();
but I have one script were I get the error message:

Access denied for user: '@localhost' to database 'winestore' (# 256).

So is there something else it could be expect the password or user
name???

Jul 17 '05 #2
It seems that your variable $username is not defined or is empty...
"dariush" <da*****@realsoftstudio.com> wrote in message
news:M0*******************@news20.bellglobal.com.. .
You may try something like this

<?php

$lnk = mysql_connect('localhost', 'mysql_user', 'mysql_password')
or die ('Not connected : ' . mysql_error());

// make foo the current db
mysql_select_db('foo', $lnk) or die ('Can\'t use foo : ' . mysql_error());

?>Database Migration ExpertsSQLPorter(Database migration
toolkit)www.realsoftstudio.com"g" <th********************@yahoo.co.uk> wrote in message news:20**************************@posting.google.c om...
I have a php scripted that access a mysql database. I use the same
access methods in other scripts and it access it the database fine:

if (!($connection = @ mysql_pconnect($hostName,
$username,
$password)))
showerror();

if (!mysql_select_db($databaseName, $connection))
showerror();
but I have one script were I get the error message:

Access denied for user: '@localhost' to database 'winestore' (# 256).

So is there something else it could be expect the password or user
name???


Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Mike MacSween | last post by:
My client has an MS Access database application on her local machine. I have full access to that in terms of changing the design. I've got a simple PHP/MySql application on shared hosting, so no...
0
by: Lenz Grimmer | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, MySQL 4.0.14, a new version of the popular Open Source/Free Software Database, has been released. It is now available in source and binary...
51
by: w_curtis | last post by:
I'm an Access user, and I'm trying to learn MySQL and then PHP so I can make some web databases. But it just isn't clicking. I've followed some tutorials, and picked up a book, but just getting...
11
by: DJJ | last post by:
I am using the MySQL ODBC 3.51 driver to link three relatively small MySQL tables to a Microsoft Access 2003 database. I am finding that the data from the MySQL tables takes a hell of a long time...
1
by: gordon.dtr | last post by:
Hi, Has anyone had this problem ? I am using MySQL ODBC 3.51 Driver, with MS Access 2003 and MySQL 4.1.11 standard log. I created my tables in MS Access, then exported them via ODBC to an...
2
by: David | last post by:
Hi, Has anyone had this problem ? I am using MySQL ODBC 3.51 Driver, with MS Access 2003 and MySQL 4.1.11 standard log. I created my tables in MS Access, then exported them via ODBC to an...
15
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to...
4
by: Vanessa | last post by:
Hi there I am an Access developer, and I have written applications for a 30 telephone call center, using the standard multiuser jet engine, it all works fine, but I want to move our systems onto...
3
by: Kevin Killion | last post by:
I've recently features to a system by making use of some simple MySQL access routines. It works fine at most test locations, correctkly accessing a MySQL database on an internet server. ...
4
jepler
by: jepler | last post by:
I find myself in a circular reference loop that I can't seem to resolve. I recently upgraded from MySQL 4.0.x to MySQL 4.1.21 on OS 10.3.9 Server. Then, I *thought* I set my open master root password...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.