DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Related

  • Useful System Table Queries in Relational Databases
  • How to Repair Corrupt MySQL Database Tables Step-by-Step
  • Harnessing the Power of AWS Aurora for Scalable and Reliable Databases
  • Optimizing MySQL Performance: Best Practices for Database Efficiency

Trending

  • Building Reliable LLM-Powered Microservices With Kubernetes on AWS
  • AI-Driven Root Cause Analysis in SRE: Enhancing Incident Resolution
  • Go 1.24+ Native FIPS Support for Easier Compliance
  • Manual Sharding in PostgreSQL: A Step-by-Step Implementation Guide
  1. DZone
  2. Data Engineering
  3. Databases
  4. Quick Tip: Granting Access to Meta-Data on MySQL

Quick Tip: Granting Access to Meta-Data on MySQL

If you have root access to your MySQL database then you can simply run a query on the database to resolve the problem.

By 
Schalk Neethling user avatar
Schalk Neethling
·
Mar. 22, 08 · Tutorial
Likes (0)
Comment
Save
Tweet
Share
45.1K Views

Join the DZone community and get the full member experience.

Join For Free

Ever seen this exception in your log files when working with MySQL as your database back-end?

User does not have access to metadata required to determine storedprocedure parameter types. If rights can not be granted, configureconnection with "noAccessToProcedureBodies=true" to have drivergenerate parameters that represent INOUT strings irregardless of actualparameter types.

Well, I have come across this now a couple of times and for some reasonI just cannot remember how to either configure the connection to usethe "noAccessToProcedureBodies=true"switch or what the exact SQL is that I need to execute to give the userthe appropriate access. This time however I decided it is time that Iplace this information somewhere I can easily find it again and whereit can potentially also help out others. Believe me to find thesolution to this via Google searches takes a while... So, I naturallythought of the DZone network and the SQL zone in particular. Enoughtalk then, below follows the solutions for both scenarios. For thesecond one however, you will need a version of the Connector/J equal toor above version 5.0.3.

If you have root access to your MySQL database then you can simply run a query on the database to resolve the problem. What the query will do is give the specified user the needed rights on the mysql.proc table. This takes the form of the following GRANT SQL query:

GRANT [SELECT, INSERT, UPDATE] ON `mysql`.`proc` TO 'myuser'@'myhost';

That's it, after running this query on the database the above exceptiongoes away. If however, you do not have the needed root access to runthis query on the database then below is the connection string to useto get around this problem. Very simple, just add &noAccessToProcedureBodies=true to your current connection string and you are done.

String connectionURL = "jdbc:mysql://localhost:3306/mydatabase?user=myuser&password=mypassword&noAccessToProcedureBodies=true"

I sincerely hope this tip will help out someone else. If not, well,then at least I now know where to go the next time I run into thisproblem :)

MySQL Database

Opinions expressed by DZone contributors are their own.

Related

  • Useful System Table Queries in Relational Databases
  • How to Repair Corrupt MySQL Database Tables Step-by-Step
  • Harnessing the Power of AWS Aurora for Scalable and Reliable Databases
  • Optimizing MySQL Performance: Best Practices for Database Efficiency

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!