Dropping table makes MySQL hang

I’m trying easier answer for newbies as i am: 1) run : SHOW PROCESSLIST if you get something like: +—-+—————–+—————–+——–+————+———–+———————————+—————————————————+ | Id | User | Host | db | Command | Time | State | Info | +—-+—————–+—————–+——–+————+———–+———————————+—————————————————+ | 4 | event_scheduler | localhost | NULL | Daemon | 580410103 | Waiting on empty queue … Read more

Are Locks AutoCloseable?

I was looking into doing this myself and did something like this: public class CloseableReentrantLock extends ReentrantLock implements AutoCloseable { public CloseableReentrantLock open() { this.lock(); return this; } @Override public void close() { this.unlock(); } } and then this as usage for the class: public class MyClass { private final CloseableReentrantLock lock = new CloseableReentrantLock(); … Read more

What’s the difference between an exclusive lock and a shared lock?

I wrote this answer down because I thought this would be a fun (and fitting) analogy: Think of a lockable object as a blackboard (lockable) in a class room containing a teacher (writer) and many students (readers). While a teacher is writing something (exclusive lock) on the board: Nobody can read it, because it’s still … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)