0

After years of no problems with my PHP webapp running MySQL 5.5 on the backend, suddenly today I'm having permissions problems.

Whenever I try to run an INSERT statement (either from PHP or from Workbench or Heidi), I get this error message: The user specified as a definer ('my_user'@'1.2.3.%') does not exist

One symptom is that INSERT statements cannot be executed by my PHP nor by remote clients such as Workbench or Heidi. I have tried various solutions suggested by:

MySQL error 1449: The user specified as a definer does not exist

Error: 1449, "The user specified as a definer ('root'@'localhost') does not exist"

Everything points to running a GRANT statement. I have tried various GRANTs as suggested, but I always get this error:

Access denied for user

It seems like my permissions got corrupted or something. So I created a brand new DB user inside BlueHost control panel on my VPS and gave full privileges. I get the same exact errors on this brand new user.

BlueHost support has no idea what to do.

Some Stack articles say to go mess around with TRIGGERS or STORED PROCS permissions - but I don't have any of these types of objects. Simple INSERT statements cause this error, and perhaps UPDATEs as well, but I'm not sure of that at this moment.

The user has FULL PRIVILEGES, as always.

What else can I try? Is there some way to fix corrupted permissions? I can run SELECT statements with no problems.

I tried connecting to the DB with root (using the same pwd as I use when connecting to WHM), but it didn't like my password or maybe the user in general. I never set up root as a specific user against this DB and I'm not sure that's a good idea. I have always used a specific user created just for this DB. Again, past 5 years no problems at all. The DB has not been upgraded, no DB changes, no user changes, nothing.

halfer
  • 19,824
  • 17
  • 99
  • 186
HerrimanCoder
  • 6,835
  • 24
  • 78
  • 158

1 Answers1

0

I sort of solved it. I ended up creating a new database with a different name, and created a new admin user to go with it. Then I ran my db backup/dump script against it. Everything works perfectly again, with this new DB. The old DB is still jacked.

I'm thinking that permissions got corrupted in the old database.

HerrimanCoder
  • 6,835
  • 24
  • 78
  • 158