473,545 Members | 1,938 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.cont actManager (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",
"d98fb3d2476eaa 8da3957481e0946 109", "Dear Morpheus", "KcompanyQS JV",
"BcountyLJS W", "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 17 '05 #1
4 2052
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 17 '05 #2

"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 17 '05 #3
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 17 '05 #4

"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 17 '05 #5

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

Similar topics

8
1621
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 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...
18
2276
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 of a performance hit I'm taking using this technique versus using 'copy' to copy directly into a container with elements in place? Thanks, d
16
3855
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 table, or perhaps bytes, being updated where the engine just decides, screw it, i'll just make a new one. surfed this group and google, but...
12
2294
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:
1
2359
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 for example an insertion contains a ' or a " this code fails. It is much better to work with @parameters. So could someone change my code to make...
4
5467
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 this would be happening, we would appreciate feedback. We have tested on 7.3.4, 7.3.6 and 7.4.1 and all exhibit the same behavior. Test case one...
2
7352
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. I'm trying to copy over related data for products, which is held in seperate tables. The main copying of the producy works fine, just not any related
0
1859
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 one INSERT INTO statement that inserts one line of data into one database, and and then a php for loop that inserts multiple lines into a database...
2
2388
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 n, const T& x); template <class InputIterator> void insert(iterator position, InputIterator first, InputIterator last);
0
7467
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7401
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7656
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7756
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5971
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3442
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1879
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1014
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
703
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.