mysql (windows 7) で作成したデータベースのリストを表示できません。
phpmyadmin を開くと、作成したデータベースのリストを表示できますが、コマンド ラインでは表示できません。
次のエラーが表示されます
エラー 1044 (42000): ユーザー ''@'localhost' のデータベース 'dbname1' へのアクセスが拒否されました
この質問ERROR 1044 (42000): データベース 'db' へのユーザー ''@'localhost' のアクセスが拒否されましたが、問題を解決できませんでした。
SHOW DATABASES;
コマンド プロンプトで入力すると、mysql は 2 つのデータベースのみを表示します。
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 15
Server version: 5.5.24-log MySQL Community Server (GPL)
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| test |
+--------------------+
2 rows in set (0.01 sec)
mysql>
しかし、私は他のデータベースも持っています。
を持つDBが1つありますInnoDB collation
。SHOW DATABASES;
コマンドを使用して表示しないことに意味はありますか?
以下のコマンドを入力すると、エラーも表示されます
mysql> mysql -h localhost -u root -p;
エラー 1064 (42000): SQL 構文にエラーがあります。1行目の「mysql -h localhost -u root -p」の近くで使用する正しい構文については、MySQLサーバーのバージョンに対応するマニュアルを確認してください。
どんな助けでも大歓迎です。