2016-06-13 9 views
0

私はすべての提案に従いましたhereしかし、私のために働いたものはありません。 Fedoraにmysqlコミュニティサーバーをインストールしましたmysql-community-server-5.7.9-1.fc21.x86_64MySQLは 'root'のパスワードをリセットできません

sudo grep 'temporary password' mysqld.logを使用して一時パスワードにアクセスしようとしましたが、パスワードを返しません。

私は

2016-06-14 10:46:00 3495 mysqld_safe: Logging to '/var/log/mysqld.log'. chown: invalid user: ‘@[email protected]’ 2016-06-14 10:46:00 3495 mysqld_safe: The file @[email protected]/mysqld does not exist or is not executable. Please cd to the mysql installation directory and restart this script from there as follows: ./bin/mysqld_safe& See http://dev.mysql.com/doc/mysql/en/mysqld-safe.html for more information

mysqld_safeを--skip-助成金・テーブルを実行すると、私はrootユーザーのパスワードをリセットすることはできませんよ、このエラーを取得するエラー Access denied for user 'root'@'localhost' (using password: NO)

を得続けます。助けてください。

+0

パスワードなしでアクセスしようとしましたか? 'mysql -uroot' –

+0

また、これを参照してください:http://stackoverflow.com/a/19229842/1911755 –

答えて

0

RESET MySQLのrootパスワード

ログインrootユーザへと

Step 1# /etc/init.d/mysql stop 
Step 2# mysqld_safe --skip-grant-tables & 
Output : Starting mysqld daemon with databases from /var/lib/mysql mysqld_safe[6025]: started 

Step 3 Login to new terminal (with root user) 

    [#] mysql -u root 

mysql> use mysql; 
mysql> update user set password=PASSWORD('NEW-ROOT-PASSWORD') where User='root'; 
mysql> flush privileges; 
mysql> quit 

Step 4 # Stop MySQL Server: 

/etc/init.d/mysql stop 

Step 5 # /etc/init.d/mysql start 

mysql -u root -pNEWPASSWORD 

を実行します(Linuxユーザのための)-------------------- - 完了----------

+0

これはパスワードを"回復 "していません。それが存在しない場所を設定するだけです。 rootユーザが未知のパスワードを持っている場合、「rootユーザで新しい端末にログインする」という手順は動作しません。 –

+0

mysqld_safeコマンドが見つかりませんでした。 – Coder

+0

あなたのLinuxマシンのrootユーザーにログインする必要があるかもしれません。そして、あなたはすべてのmysqlコマンドにアクセスできます –

関連する問題