不行。 ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
mysql> lock tables WRITE; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WRITE' at line 1 mysql> lock tables read; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'read' at line 1 mysql> lock tables LOW_PRIORITY WRITE; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LOW_PRIORITY WRITE' at line 1 mysql> LOCK TABLES; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 mysql>
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4015 Server version: 5.5.24-log Source distributionCopyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved
我知道了,用下面的语句就好了。================================ FLUSH TABLES WITH READ LOCK; UNLOCK TABLES;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WRITE' at line 1
mysql> lock tables read;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'read' at line 1
mysql> lock tables LOW_PRIORITY WRITE;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LOW_PRIORITY WRITE' at line 1
mysql> LOCK TABLES;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
mysql>
Your MySQL connection id is 4015
Server version: 5.5.24-log Source distributionCopyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved
FLUSH TABLES WITH READ LOCK;
UNLOCK TABLES;