MySQL Forums
Forum List  »  Newbie

Having One and Only User But Having Not Admin Permissions
Posted by: YILDIZ Recep
Date: June 21, 2023 01:28AM

Hi,

I have a Laravel project, under the .env file I have a block like this:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=my_admin
DB_USERNAME=my_admin
DB_PASSWORD=randomChars

So I downloaded MySQL Workbench and connected to my application's database with the credentials above without any problem.

I can do row delete, update with workbench's UI tools etc. But when it comes to writing a trigger, I get permission, and privileges errors.

I ran the code SHOW GRANTS FOR 'my_admin@'%'; and the result is:

_________________________________________________
Grants for my_admin@%
_________________________________________________
'GRANT USAGE ON . TO my_admin@%'
_________________________________________________
'GRANT ALL PRIVILEGES ON my_admin.* TO my_admin@%
_________________________________________________


I need to write a trigger for auto delete but this privilege errors I get is a real pain. Need help here please.

By the way, I checked the logs and the user 'my_admin' is created with all privileges. The code placed in the logs:

CREATE DATABASE IF NOT EXISTS my_admin;

CREATE USER IF NOT EXISTS 'my_admin'@'%' IDENTIFIED BY '$mysqlAppPassword';

GRANT ALL PRIVILEGES ON my_admin.* TO 'my_admin'@'%';



and yes, database name and user's name is same.

I get 1044, 1142, 1419 errors (permission and privilege errors) all the time I try to change something

Options: ReplyQuote




Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.