InnoDB implements standard row-level locking where there are two types of locks, shared (S) locks and exclusive (X) locks.
A shared (S) lock permits the transaction that holds the lock to read a row.
An exclusive (X) lock permits the transaction that holds the lock to update or delete a row.
Additionally, InnoDB supports multiple granularity locking which permits coexistence of record locks and locks on entire tables. To make locking at multiple granularity levels practical, additional types of locks called intention locks are used.
There are two types of intention locks used in InnoDB (assume that transaction T has requested a lock of the indicated type on table t):
Intention shared (IS): Transaction T intends to set S locks on individual rows in table t.
Intention exclusive (IX): Transaction T intends to set X locks on those rows.
The intention locking protocol is as follows:
Before a transaction can acquire an S lock on a row in table t, it must first acquire an IS or stronger lock on t.
Before a transaction can acquire an X lock on a row, it must first acquire an IX lock on t.
These rules can be conveniently summarized by means of the following lock type compatibility matrix.
Encountered: $ sudo service ssh --full-restart * Stopping OpenBSD Secure Shell server sshd [ OK ] * Starting OpenBSD Secure Shell server sshd sshd: no hostkeys available -- exiting. Run ssh-keygen -A In the /etc/ssh/ folder, and then restart the server by: $ sudo service ssh --full-restart * Stopping OpenBSD Secure Shell server sshd [ OK ] * Starting OpenBSD Secure Shell server sshd [ OK ]
mv is the wrong tool for this job; you want cp and then rm . Since you're moving the file to another filesystem this is exactly what mv is doing behind the scenes anyway, except that mv is also trying to preserve file permission bits and owner/group information. This is because mv would preserve that information if it were moving a file within the same filesystem and mv tries to behave the same way in both situations. Since you don't care about the preservation of file permission bits and owner/group information, don't use that tool. Use cp --no-preserve=mode and rm instead. But if you don't care about the warning, mv actually does move the files before complaining ownership problem.