
Ubuntu日本語フォーラム

ログインしていません。
SiteBarのInstall を <http://www19.atwiki.jp/raphloig/?cmd=word&word=MySQL&type=normal&page=sitebar> サイトを参考に行っているのですが、
MySQLの設定のところで、
$mysql -u root -p で、password を打ち間違えていないのに、Access deniedになるので、
$mysql -u root@localhost -p で、'@localhost' をつけてあげると、mysql>プロンプトが出ます。
で、... データベースは、作成できるのですが、
create user sitebar@localhost;
すると、エラーになってしまいます。
何が原因か、ご教示いただけないでしょうか?
yama@roswell:~$ mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
yama@roswell:~$ mysql -u root@localhost -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 130
Server version: 5.1.62-0ubuntu0.11.10.1 (Ubuntu)
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> create database sitebar;
Query OK, 1 row affected (0.00 sec)
mysql> create user sitebar@localhost;
ERROR 1227 (42000): Access denied; you need the CREATE USER privilege for this operation
mysql>
オフライン
環境を書き忘れしたので、追加しておきます。
Welcome to Linux Mint 12 Lisa (GNU/Linux 3.0.0-12-generic i686)
yama@roswell:~$ mysql -V
mysql Ver 14.14 Distrib 5.1.62, for debian-linux-gnu (i686) using readline 6.2
になります。
オフライン
MySQL でアクセス先ホストを指定するには、
$ mysql -h HOST -u USER -p
などとします。
-u USER@HOST とするとユーザ名が "USER@HOST" という指定になってしまいます。
従って、なぜかは知りませんが、"root@localhost" という名前の root とは別のユーザが作られており、
そのユーザでログインして作業しているため、権限が足りないと怒られているようです。
root でログインできない理由はわかりませんが、
念の為パスワードを再設定して接続できないか確認してください。
http://dev.mysql.com/doc//refman/4.1/ja/resetting-permissions.html
オフライン