• 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Unable to access mysql database in browser

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
am accessing database remotely. I can able to access database through terminal with user name and password but in browser it gives the following error message.  


err.png
[Thumbnail for err.png]
 
Saloon Keeper
Posts: 5765
146
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The error message seems clear enough: what access does user phpmyadmin have for connections from "localhost"?
 
Sheriff
Posts: 21783
103
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does user phpmyadmin even exist? If you install phpmyadmin, it doesn't automatically add a new database user.
 
Gayathri Gayu
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes the user phpmyadmin exist. When installing phpmyadmin i created user and password. When login through terminal I can able to access the database with same username and password but not  in the browser.
 
Tim Moores
Saloon Keeper
Posts: 5765
146
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Moores wrote:what access does user phpmyadmin have for connections from "localhost"?


From a permissions perspective, logging in via the CLI tool is not the same as logging in programmatically from localhost.
 
Gayathri Gayu
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Moores wrote:

Tim Moores wrote:what access does user phpmyadmin have for connections from "localhost"?


From a permissions perspective, logging in via the CLI tool is not the same as logging in programmatically from localhost.



When i can able to create db and tables through terminal i should able to access the db from my jsp code right? Even then when i tried the following code to connect the database it gives me the error.



java.sql.SQLException: null,  message from server: "Host 'Hostname' is not allowed to connect to this MariaDB server"

 
Tim Moores
Saloon Keeper
Posts: 5765
146
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is your machine really named "Hostname"?

Gayathri wrote:When i can able to create db and tables through terminal i should able to access the db from my jsp code right?



No.

Tim wrote:From a permissions perspective, logging in via the CLI tool is not the same as logging in programmatically from localhost.



Post the list of users and grants as described in http://xmodulo.com/how-to-view-list-of-mysql-users-and-their-privileges.html
 
Master Rancher
Posts: 1988
15
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try loopback ip or localhost.
 
What a show! What atmosphere! What fun! What a tiny ad!
create, convert, edit or print DOC and DOCX in Java
https://products.aspose.com/words/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!