473,395 Members | 1,969 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,395 software developers and data experts.

Insert fails on access that I know works...


Folks,

I use PHP to write my form data to MySQL.

I have a database with about ten tables. I'm trying to fill one table with
some dummy data (its a contact manager table holding names of people,
addresses and whatever but I'm createing random values for the moment). The
insert fails telling me that access is denied - however I use the exact same
username/password/database name/host name on the other tables, and the
insert and updates work just fine.

I know this sounds odd - but is there any other reason as to why I might get
the access denied message, other than what I assume should be just for an
invalid username/password?

The following is a customized output of my error:

Query failed
Error Number 1044
Message: Access denied for user: '@localhost' to database 'myDatabase'
Comments:INSERT INTO myDatabase.contactManager (title, firstname, initial,
lastname, position, publisherHash, salutation, company, county, teldd,
telfax, telddext, division, telsb, telsbext, telcell, telpager, telother,
address1, address2, city, postcode, country, email, website, type) VALUES
("Ms", "Morpheus", "W", "YlastnameVFRE", "Partner",
"d98fb3d2476eaa8da3957481e0946109", "Dear Morpheus", "KcompanyQSJV",
"BcountyLJSW", "251-823-1450", "251-479-4495", "35", "Vancouver",
"251-682-5043", "883", "604-587-3284", "423-435-8301", "423-734-9771",
"Apartment 777 - 9431 North Way", "South Coquitlam", "Nanaimo", "Q22E14",
"CA", "bt*@gxyphn.net", "www.gxyphn.net", "1")

HOST= 192.168.1.2
USER= myUser
PASSWORD= myPassword
NAME= myDatabase
TABLE= contactManager

Can anyone suggest one area that I could look at to help fix the problem?
Pleaseeeeeee...

many thanks,
randelld
Jul 19 '05 #1
8 1616
Randell D. <yo**************************@yahoo.com> wrote:
I have a database with about ten tables. I'm trying to fill one table with
some dummy data (its a contact manager table holding names of people,
addresses and whatever but I'm createing random values for the moment). The
insert fails telling me that access is denied - however I use the exact same
username/password/database name/host name on the other tables, and the
insert and updates work just fine.
So you might have a permission problem, apparantly yhe user doens't have
insert priveliges...
I know this sounds odd - but is there any other reason as to why I might get
the access denied message, other than what I assume should be just for an
invalid username/password?


On the mysql site they have a whole page about this:
http://www.mysql.com/doc/en/Access_denied.html

--

Daniel Tryba

Jul 19 '05 #2
Randell D. <yo**************************@yahoo.com> wrote:
I have a database with about ten tables. I'm trying to fill one table with
some dummy data (its a contact manager table holding names of people,
addresses and whatever but I'm createing random values for the moment). The
insert fails telling me that access is denied - however I use the exact same
username/password/database name/host name on the other tables, and the
insert and updates work just fine.
So you might have a permission problem, apparantly yhe user doens't have
insert priveliges...
I know this sounds odd - but is there any other reason as to why I might get
the access denied message, other than what I assume should be just for an
invalid username/password?


On the mysql site they have a whole page about this:
http://www.mysql.com/doc/en/Access_denied.html

--

Daniel Tryba

Jul 19 '05 #3

"Daniel Tryba" <ne****************@canopus.nl> wrote in message
news:bn**********@news.tue.nl...
Randell D. <yo**************************@yahoo.com> wrote:
I have a database with about ten tables. I'm trying to fill one table with some dummy data (its a contact manager table holding names of people,
addresses and whatever but I'm createing random values for the moment). The insert fails telling me that access is denied - however I use the exact same username/password/database name/host name on the other tables, and the
insert and updates work just fine.


So you might have a permission problem, apparantly yhe user doens't have
insert priveliges...
I know this sounds odd - but is there any other reason as to why I might get the access denied message, other than what I assume should be just for an invalid username/password?


On the mysql site they have a whole page about this:
http://www.mysql.com/doc/en/Access_denied.html

--

Daniel Tryba


Thanks for pointing me to the documentation - but it didn't help me (though
it might do in the future).

The user does have insert privilages - I had mentioned this earlier in my
post saying the same username and password worked for a different table in
the same database on the same server...

I think though I have solved it - Strangely, even though the message did
point to access being denied, I believe the problem related to a column in
the table that was suppoed to be unique, wasn't.

I have a unique hash created for each record - I discovered that even after
seeding a new random number sequence, the same md5 hash was created every
time... I've changed the code and unique hashes are created everytime now,
and the records seem to be writing just fine. So far, I've written four or
five thousand records...

Thanks for the prompt reply though...
Jul 19 '05 #4

"Daniel Tryba" <ne****************@canopus.nl> wrote in message
news:bn**********@news.tue.nl...
Randell D. <yo**************************@yahoo.com> wrote:
I have a database with about ten tables. I'm trying to fill one table with some dummy data (its a contact manager table holding names of people,
addresses and whatever but I'm createing random values for the moment). The insert fails telling me that access is denied - however I use the exact same username/password/database name/host name on the other tables, and the
insert and updates work just fine.


So you might have a permission problem, apparantly yhe user doens't have
insert priveliges...
I know this sounds odd - but is there any other reason as to why I might get the access denied message, other than what I assume should be just for an invalid username/password?


On the mysql site they have a whole page about this:
http://www.mysql.com/doc/en/Access_denied.html

--

Daniel Tryba


Thanks for pointing me to the documentation - but it didn't help me (though
it might do in the future).

The user does have insert privilages - I had mentioned this earlier in my
post saying the same username and password worked for a different table in
the same database on the same server...

I think though I have solved it - Strangely, even though the message did
point to access being denied, I believe the problem related to a column in
the table that was suppoed to be unique, wasn't.

I have a unique hash created for each record - I discovered that even after
seeding a new random number sequence, the same md5 hash was created every
time... I've changed the code and unique hashes are created everytime now,
and the records seem to be writing just fine. So far, I've written four or
five thousand records...

Thanks for the prompt reply though...
Jul 19 '05 #5
Randell D. <yo**************************@yahoo.com> wrote:
On the mysql site they have a whole page about this:
http://www.mysql.com/doc/en/Access_denied.html
Thanks for pointing me to the documentation - but it didn't help me (though
it might do in the future).

The user does have insert privilages - I had mentioned this earlier in my
post saying the same username and password worked for a different table in
the same database on the same server...


Hmmmm, I forgot that access in mysql is per database and not per table
:)
I think though I have solved it - Strangely, even though the message did
point to access being denied, I believe the problem related to a column in
the table that was suppoed to be unique, wasn't.

I have a unique hash created for each record - I discovered that even after
seeding a new random number sequence, the same md5 hash was created every
time... I've changed the code and unique hashes are created everytime now,
and the records seem to be writing just fine. So far, I've written four or
five thousand records...


Funny, normaly a more approriate error would occur (at least that is my
experience).

--

Daniel Tryba

Jul 19 '05 #6
Randell D. <yo**************************@yahoo.com> wrote:
On the mysql site they have a whole page about this:
http://www.mysql.com/doc/en/Access_denied.html
Thanks for pointing me to the documentation - but it didn't help me (though
it might do in the future).

The user does have insert privilages - I had mentioned this earlier in my
post saying the same username and password worked for a different table in
the same database on the same server...


Hmmmm, I forgot that access in mysql is per database and not per table
:)
I think though I have solved it - Strangely, even though the message did
point to access being denied, I believe the problem related to a column in
the table that was suppoed to be unique, wasn't.

I have a unique hash created for each record - I discovered that even after
seeding a new random number sequence, the same md5 hash was created every
time... I've changed the code and unique hashes are created everytime now,
and the records seem to be writing just fine. So far, I've written four or
five thousand records...


Funny, normaly a more approriate error would occur (at least that is my
experience).

--

Daniel Tryba

Jul 19 '05 #7

"Daniel Tryba" <ne****************@canopus.nl> wrote in message
news:bn**********@news.tue.nl...
Randell D. <yo**************************@yahoo.com> wrote:
On the mysql site they have a whole page about this:
http://www.mysql.com/doc/en/Access_denied.html


Thanks for pointing me to the documentation - but it didn't help me (though it might do in the future).

The user does have insert privilages - I had mentioned this earlier in my post saying the same username and password worked for a different table in the same database on the same server...


Hmmmm, I forgot that access in mysql is per database and not per table
:)
I think though I have solved it - Strangely, even though the message did
point to access being denied, I believe the problem related to a column in the table that was suppoed to be unique, wasn't.

I have a unique hash created for each record - I discovered that even after seeding a new random number sequence, the same md5 hash was created every time... I've changed the code and unique hashes are created everytime now, and the records seem to be writing just fine. So far, I've written four or five thousand records...


Funny, normaly a more approriate error would occur (at least that is my
experience).

--

Daniel Tryba


I would agree - I though would think its more likely I unknowingly fixed
more than one bug in my script than an error in MySQL...

Thanks for the help though...
Jul 19 '05 #8

"Daniel Tryba" <ne****************@canopus.nl> wrote in message
news:bn**********@news.tue.nl...
Randell D. <yo**************************@yahoo.com> wrote:
On the mysql site they have a whole page about this:
http://www.mysql.com/doc/en/Access_denied.html


Thanks for pointing me to the documentation - but it didn't help me (though it might do in the future).

The user does have insert privilages - I had mentioned this earlier in my post saying the same username and password worked for a different table in the same database on the same server...


Hmmmm, I forgot that access in mysql is per database and not per table
:)
I think though I have solved it - Strangely, even though the message did
point to access being denied, I believe the problem related to a column in the table that was suppoed to be unique, wasn't.

I have a unique hash created for each record - I discovered that even after seeding a new random number sequence, the same md5 hash was created every time... I've changed the code and unique hashes are created everytime now, and the records seem to be writing just fine. So far, I've written four or five thousand records...


Funny, normaly a more approriate error would occur (at least that is my
experience).

--

Daniel Tryba


I would agree - I though would think its more likely I unknowingly fixed
more than one bug in my script than an error in MySQL...

Thanks for the help though...
Jul 19 '05 #9

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

Similar topics

4
by: Randell D. | last post by:
Folks, I use PHP to write my form data to MySQL. I have a database with about ten tables. I'm trying to fill one table with some dummy data (its a contact manager table holding names of...
18
by: deancoo | last post by:
I have gotten into the habit of often using copy along with an insert iterator. There are scenarios where I process quite a lot of data this way. Can someone give me a general feel as to how much...
16
by: robert | last post by:
been ruminating on the question (mostly in a 390/v7 context) of whether, and if so when, a row update becomes an insert/delete. i assume that there is a threshold on the number of columns of the...
12
by: Joe Stanton | last post by:
Hello Group I have a query that works in Oracle and SQL Server, but fails in Microsoft Access. The query is: SELECT data fromTABLE1 WHERE data>='A&' AND data<'A''' Here is my sample data:
8
by: Bri | last post by:
Greetings, I'm having a very strange problem in an AC97 MDB with ODBC Linked tables to SQL Server 7. The table has an Identity field and a Timestamp field. The problem is that when a new record...
1
by: nicholas | last post by:
To insert a record in a Ms Access database and be able to retrieve the newly created ID (autonumber) I used the code below (code 1). Now, the problem is that this is not very secure and that, if...
4
by: Chris Kratz | last post by:
Hello all, We have run into what appears to be a problem with rules and subselects in postgres 7.4.1. We have boiled it down to the following test case. If anyone has any thoughts as to why...
2
by: David | last post by:
Hi, I have a MySQL database linked to an MS Access front-end. I have an app which works fine with the local copy of the Access DB, but when run with the linked tables for MySQL, it fails. ...
0
by: radiodes | last post by:
I am very new to SQL/Access, and only use it very limitedly, so apologies ahead of time. I have a website that inserts data into an access database, using the code below. Basically, I've got...
2
by: subramanian100in | last post by:
In ISO/IEC 14882:2003 document, in the section '23.2.1.3 deque modifiers', the following is mentioned: iterator insert(iterator position, const T& x); void insert(iterator position, size_type...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.