Skip to main content

272 posts tagged with "Issues"

Common Issues and Troubleshooting

View All Tags

Fixed: "ERROR 1142 (42000): SELECT command denied to user for table 'data_locks'" in MySQL

· 4 min read
Jagdish Kumawat
Founder @ Dewiride

Looking at MySQL's locks failed with ERROR 1142 (42000): SELECT command denied to user 'inventory_app'@'localhost' for table 'data_locks'. The table's fine, and so is the account: it just has no rights outside its own database. Here's the fix, on a separate account, so the application's account stays as it is.

Fixed: "ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER or SYSTEM_VARIABLES_ADMIN privilege(s)" in MySQL

· 5 min read
Jagdish Kumawat
Founder @ Dewiride

Changing a MySQL setting failed with ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER or SYSTEM_VARIABLES_ADMIN privilege(s) for this operation. The word GLOBAL in the statement is the cause. Most of the time you don't want the whole server changed anyway, and one word fixes it.

Fixed: "ERROR 1227 (42000): Access denied; you need (at least one of) the PROCESS privilege(s) for this operation" in MySQL

· 5 min read
Jagdish Kumawat
Founder @ Dewiride

I wanted to see which transactions were open, and MySQL said ERROR 1227 (42000): Access denied; you need (at least one of) the PROCESS privilege(s) for this operation. The account has full rights on its own database, and that's not enough. Here's why, and the right way to fix it without making your application's account more powerful.

Fixed: "ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction" in MySQL

· 6 min read
Jagdish Kumawat
Founder @ Dewiride

An UPDATE hung for a while, then failed with ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction. Raising the timeout is the tempting fix, and the wrong one, because the real problem is another transaction holding the row. Here's how to find it, and a surprise about what the error leaves behind.

Fixed: "ERROR 1213 (40001): Deadlock found when trying to get lock; try restarting transaction" in MySQL

· 8 min read
Jagdish Kumawat
Founder @ Dewiride

An ordinary UPDATE failed with ERROR 1213 (40001): Deadlock found when trying to get lock; try restarting transaction, and MySQL threw away everything the transaction had done so far. Two transactions had taken the same rows in opposite orders. Here's how to see that for yourself, and the small change that stops it.