Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Access denied

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hye,
I made a JApplet with Mysql connection, the serveur web : resin.
My Pb : when I run my applet in local host i have any problem, http://localhost:8080/ -> Ok no problem
But On web : http://Dubois:8080/ -> I have an error :
java.sql.SQLException: General error: Access denied for user

I don't understand Why!
"please help me" (liloo 5th elements)
 
Saloon Keeper
Posts: 22122
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's the old sandbox again. When the applet is running on the host (localhost), it's trustworthy. When the host is a different machine, it's not.
Don't waste your time trying to fool it by using alternate host names, absolute IP addresses, etc. The sandbox is wise to those tricks. If YOU know whether the server and client are on the same machine, so does IT.
You'll either have to sign your applet or do the data access on the server and ship it to the applet. I recommend the second approach, or the next wall you hit is likely to be the firewall.
 
You would be much easier to understand if you took that bucket off of your head. And that goes for the tiny ad too!
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic