没学过数据库,照抄书上的.
mysql> grant all on depot_development.* to 'dave'@'localhost';
这个句子是什么意思,为什么会导致出错?
ERROR 1133 (42000): Can't find any matching row in the user table上面这个是什么错误?
========
Enter password: *********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.27-community-ntType 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| depot_development |
| depot_production |
| depot_test |
| mybook |
| mysql |
| test |
+--------------------+
7 rows in set (0.00 sec)mysql> grant all on depot_development.* to 'dave'@'localhost';ERROR 1133 (42000): Can't find any matching row in the user tablemysql> grant all on depot_test.* to 'dave'@'localhost';ERROR 1133 (42000): Can't find any matching row in the user tablemysql> grant all on depot_production.* to 'prod'@'localhost' identified by 'wibb
le';
Query OK, 0 rows affected (0.00 sec)
mysql> grant all on depot_development.* to 'dave'@'localhost';
这个句子是什么意思,为什么会导致出错?
ERROR 1133 (42000): Can't find any matching row in the user table上面这个是什么错误?
========
Enter password: *********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.27-community-ntType 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| depot_development |
| depot_production |
| depot_test |
| mybook |
| mysql |
| test |
+--------------------+
7 rows in set (0.00 sec)mysql> grant all on depot_development.* to 'dave'@'localhost';ERROR 1133 (42000): Can't find any matching row in the user tablemysql> grant all on depot_test.* to 'dave'@'localhost';ERROR 1133 (42000): Can't find any matching row in the user tablemysql> grant all on depot_production.* to 'prod'@'localhost' identified by 'wibb
le';
Query OK, 0 rows affected (0.00 sec)
mysql> grant all on depot_development.* to 'root'@'localhost';
就好了.然后成功提示
Query OK.0 row affected (0.08sec)------------------------------
qifanz┊Gmail.com