mysql で、
user:root 時に、database:sitebar の table を表示できる のに、
user:sitebar時に、database:sitebar の table を表示できない のは
なぜですか?
user:sitebarには、database:sitebar への権限を当て得ているのですが...
■ user rootで、mysqlへlogin
yama@jpx20120007:~$ sudo mysql mysql Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 17 Server version: 10.1.26-MariaDB-0+deb9u1 Debian 9.1 Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [mysql]> select user, host from mysql.user; +---------+-----------+ | user | host | +---------+-----------+ | root | localhost | | sitebar | localhost | +---------+-----------+ 2 rows in set (0.12 sec) MariaDB [mysql]> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | sitebar | +--------------------+ 4 rows in set (0.00 sec) MariaDB [mysql]> use sitebar; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed MariaDB [sitebar]> show tables; +-------------------+ | Tables_in_sitebar | +-------------------+ | sitebar_acl | | sitebar_cache | | sitebar_config | | sitebar_data | | sitebar_group | | sitebar_link | | sitebar_member | | sitebar_node | | sitebar_root | | sitebar_session | | sitebar_token | | sitebar_user | | sitebar_user_data | | sitebar_visit | +-------------------+ 14 rows in set (0.00 sec) MariaDB [sitebar]> show grants for sitebar@localhost; +----------------------------------------------------------------------------------------------------------------+ | Grants for sitebar@localhost | +----------------------------------------------------------------------------------------------------------------+ | GRANT USAGE ON *.* TO 'sitebar'@'localhost' IDENTIFIED BY PASSWORD '*C10F6810992E2D82CDF96FF18C4735317D4FE2A7' | | GRANT ALL PRIVILEGES ON `sitebar`.`sitebar` TO 'sitebar'@'localhost' | +----------------------------------------------------------------------------------------------------------------+ 2 rows in set (0.00 sec)
■ user sitebarで、mysqlへlogin
yama@jpx20120007:~$ mysql -u sitebar -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 18 Server version: 10.1.26-MariaDB-0+deb9u1 Debian 9.1 Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | sitebar | +--------------------+ 2 rows in set (0.00 sec) MariaDB [(none)]> use sitebar; Database changed MariaDB [sitebar]> show grants; +----------------------------------------------------------------------------------------------------------------+ | Grants for sitebar@localhost | +----------------------------------------------------------------------------------------------------------------+ | GRANT USAGE ON *.* TO 'sitebar'@'localhost' IDENTIFIED BY PASSWORD '*C10F6810992E2D82CDF96FF18C4735317D4FE2A7' | | GRANT ALL PRIVILEGES ON `sitebar`.`sitebar` TO 'sitebar'@'localhost' | +----------------------------------------------------------------------------------------------------------------+ 2 rows in set (0.00 sec) MariaDB [sitebar]> show tables; Empty set (0.00 sec)
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/12/27 01:53