MySQL view permission settings for Stomp Experience

Source: Internet
Author: User
Tags stomp mysql view
1. Event background
Today, when the lunch point approached, the development colleague sent a request to create two views in the MARIADB library, requiring the specified account to have read-only permissions.
Very simple requirements, connected to the server, two grant command a brush, fulsh privileges Enter, landlord on the safe to eat.

2. The emphasis came, waiting for the landlord to return, (also in the downstairs played the King pesticide, platoon two even kneel (┬_┬)),
I was called in by my colleague in the morning.

3. Steady
Instant Circle of me, back to a moment, and then hurriedly to check the reason.
After repeatedly confirming grant no problem, the landlord continued to circle. At this point the distance to this question, has been 20 minutes,
Very anxious Ah, clearly a small demand how can this.
In the landlord extremely helpless, suddenly point to the design view of the Advanced page, see the security ' definer ' this point.

A certain degree of omnipotence gave me the answer, when the security of the view is Definer, the database exists definer the specified user, that is, the definition in the diagram is filled in. And the user has the corresponding permissions to execute. Regardless of whether the current user has permissions.
When the security of a view is invoker, execution can succeed as long as the performer has execute permissions.
I modified the problem resolution after the diagram, because it was written ' [email protected]%.% ' and the security of the view is definer caused. Of course, if the development is not a specified account read-only, you can also invoker the security definition, so long as there are permissions to this view can be viewed.

Reference: http://pdf.us/2018/02/24/679.html

MySQL view permission settings for Stomp Experience

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.