Change and Reset MySQL root Password MySQLのrootのパスワードを変更し、リセット
Other then the ways specified他の方法で入力し、指定 hereここで to reset and change the root password for mySQL database in the case that the password is forgotten or lost, the following instructions explain in details the alternative way at the last part of the guide, where no additional file needs to be created: rootのパスワードをリセットするために変更し、 MySQLデータベースの場合には、パスワードを忘れたり、失われたり、詳細は、次の手順を説明し、代替手段は、このガイドの最後の部分、ここで追加のファイルを作成する必要があります:
- Login as root to the Windows or Unix-like (Unix, Linux or BSD) machine with the MySQL server.は、 rootとしてログインしてWindowsやUNIXライクな( UNIXは、 LinuxやBSDの)マシンで、 MySQLサーバです。
- Stop the MySQL server by using either of the following command: MySQLサーバを使用して停止するには、以下のコマンドのいずれかの:
Linux: /etc/rc.d/init.d/mysql stopリナックスなります: / etc / rc.d / init.dに/ MySQLの停止
FreeBSD: /usr/local/etc/rc.d/mysql-server.sh stop FreeBSDの: / usr /ローカル/等/ rc.d / MySQLの- server.sh停止 - Open the mysql server startup script (ie mysql-server.sh - the file executed to start or stop MySQL server. MySQLサーバスタートアップスクリプトを開いて(すなわちのMySQL - server.sh -ファイルの実行を開始または停止するM ySQLサーバです。
- Add –skip-grant-tables to the end of the line that contains the mysqld_safe command as its parameter.アドインをスキップ-助成金-のテーブルを、その行の最後にコマンドが含まれてmysqld_safeはそのパラメータを指定します。
- Start MySQL server with the following command:スタート]ボタンをMySQLサーバには、以下のコマンド:
Linux: /etc/rc.d/init.d/mysql startリナックスなります: / etc / rc.d / init.dに/ MySQLのスタート]ボタンを
FreeBSD: /usr/local/etc/rc.d/mysql-server.sh start FreeBSDの: / usr /ローカル/等/ rc.d / MySQLの- server.shスタート]ボタンを - Alternatively, start the MySQL server directly and skip the editing with the following command:また、 MySQLサーバを直接起動して、スキップして編集するには、以下のコマンド:
mysqld_safe –skip-grant-tables & mysqld_safeをスキップ-助成金-テーブル&
Depending on your path environment, you may need to point to the correct directory where mysqld_safe is instead.お客様のパスを環境に応じて、必要に応じて、適切なディレクトリをポイントしてmysqld_safeでは、代わりにします。
- Run the following commands to login as the mysql user and connect to mysql user/permission database:以下のコマンドを実行してMySQLユーザとしてログインし、接続してMySQLユーザ/許可データベース:
# mysql -u root mysql # MySQLの- uルートのMySQL
- Run the update queries to change the MySQL password:クエリを実行して更新プログラムを変更するにMySQLのパスワード:
mysql> UPDATE user SET Password=PASSWORD(’newrootpassword’) WHERE User=’root’; MySQLの> "アップデートユーザーパスワードの設定=パスワード( ' newrootpassword ' )ここで、 user = 'ルート' ;
mysql> FLUSH PRIVILEGES; MySQLの>フラッシュ権限;Note: Replace newrootpassword with the new root password for MySQL server.注:置き換えるnewrootpasswordは、新しいMySQLサーバのrootユーザのパスワードです。 Flush Privileges is needed to making the password change effect immediately.フラッシュの権限を作る必要に応じて、パスワードの変更が反映されます。
- Exit mysql database client by typing exit.出口MySQLデータベースクライアントを入力して終了します。
- Stop MySQL server with commands listed at step 2. MySQLサーバにコマンドを停止するステップ2記載されています。
- Open the mysql server startup script edit in step 3 again and remove the –skip-grant-tables parameter that has been added. MySQLサーバスタートアップスクリプトを開いて、ステップ3を再度編集や削除してスキップ-助成金-テーブルのパラメータには追加されました。
- Start MySQL server by using command from step 5 or 6. MySQLサーバを使用してコマンドを開始するステップ5または6 。
For Redhat Linux users, use the following instructions as the root user of Redhat Linux machine: Redhat Linuxのユーザは、以下の手順を使用して、 rootユーザとしてのRedhat Linuxを機:
- Stop MySQL process by using command:コマンドを使用してMySQLのプロセスを停止:
# killall mysqld # killallをmysqldの
- Start the MySQL server with following options: MySQLサーバを起動して以下のオプション:
# /usr/libexec/mysqld -Sg –user=root & # / usr / libexec / mysqldを-用SG -ユーザ=ルート&
- Start the MySQL client: mysqlクライアントを起動します:
# mysql # MySQLの
You should see the following message:詳細については、次のメッセージが表示する必要が:
Welcome to the MySQL monitor. MySQLモニタへようこそ。 Commands end with ; or g.コマンドを最後に、またはg.
Your MySQL connection id is 1 to server version: 3.xx.xx MySQL接続してサーバのバージョン番号は1から: 3.xx.xxType ‘help;’ or ‘h’ for help.タイプ'ヘルプ; 'または' h 'にしてください。 Type ‘c’ to clear the buffer.タイプ' c 'にバッファをクリアしています。
mysql> MySQLの>
- Use mysql database: MySQLデータベースを使用する:
mysql> USE mysql MySQLの> " MySQLの
You should see the following message:詳細については、次のメッセージが表示する必要が:
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データベースが変更されました
- Then, update the password for the root user with the following command:次に、 rootユーザのパスワードを更新するには、次のコマンド:
UPDATE user SET password=password(”newpassword”) WHERE user=”root”;更新プログラムのユーザのパスワード=パスワードを設定する( " newpassword " )ここで、 user =の" root " ;
Replace newpassword with your desired password. newpasswordに置き換えるご希望のパスワードを入力します。 You should see the following message:詳細については、次のメッセージが表示する必要が:
Query OK, 2 rows affected (0.03 sec)クエリよし、 2行の影響を受ける( 0.03秒)
Rows matched: 2 Changed: 2 Warnings: 0似た行: 2変更: 2警告: 0Rows affected may be different, but the Query OK should be there.影響を受ける行が異なる場合がありますが、オクラホマ、クエリの必要がある。
- Flush the database privileges to reload it in order to make the changes effective:フラッシュし、データベースの権限をリロードして変更を行うために効果的な:
mysql> flush privileges; MySQLの>フラッシュ権限;
You should get the following result:を取得するべきかを、次の検索結果:
Query OK, 0 rows affected (0.02 sec)クエリオクラホマ、 0行の影響を受ける( 0.02秒)
- Exit the MySQL client by typing exit.終了してmysqlクライアントを入力して終了します。
- Kill the MySQL server process by typing killall mysqld. MySQLサーバプロセスを台無しにするのmysqld killallを入力します。
- Then start MySQL again: MySQLのスタート]ボタンを再度入力し:
/etc/init.d/mysqld start / etc / init.dに/ mysqldを開始
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 重要 :これは、機械翻訳ページで提供"現状有姿"を保証します。 Machine translation may be difficult to understand.機械翻訳を理解するのは難しいかもしれません。 Please refer toをご覧ください original English articleオリジナルの英語記事索引 whenever possible.可能な限りです。
Share and contribute or get technical support and help atを共有して貢献や技術サポートとヘルプを得る My Digital Life Forums 私のデジタルライフフォーラム .です。
Related Articles関連記事
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 3 FreeBSDの6.0をインストールするWebサーバーのApache 2.2 、 MySQL 5.0以降およびPHP 5 -パート3
- Reset the Root Password of MySQL ServerルートのパスワードをリセットしてMySQLサーバ
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 4ウェブサーバーでは、 Windows XPをインストールするのApache2 、 PHP5とmysql4 -パート4
- Check and Optimize MySQL Database Automatically with Crontab/Cron MySQLデータベースの最適化を自動的にチェックのcrontab / cronの
- How to Recover and Reset Gmail (Google Account) Password Gmailにし、リセットを回復する方法( Googleアカウント)のパスワード
- How to Reset AdSense Password Not Associated with Google Account AdSenseのパスワードをリセットする方法Googleアカウントに関連付けられていません
- How to Reset WordPress Password to Recover Forgotten Secret WordPressのパスワードをリセットする方法忘れてしまったの秘密を回復する
- Change Oracle Database User Password Oracleデータベースのユーザのパスワードを変更
- Apple iPhone Root Password and Mobile User Passwordアップルiphoneのルートパスワードを入力し、携帯電話ユーザーのパスワード
- Fix for Munin MySQL Monitoring Plugin Graph Not Showing or Blank munin MySQLの監視差込式の修正プログラムまたは空白のグラフに表示されていません















June 6th, 2006 18:18 2006年6月6日18:18
[...] Alternatively, on any platform, mysql client can be used to set the new password, althought it’s less secure way of resetting the password (detailed instruction here): [...] [...]また、どんなプラットフォームでも、 mysqlクライアントを使用して新しいパスワードを設定して、これの少ない安全な方法のパスワードをリセットして(ここでの詳細な命令) : [...]
July 9th, 2006 12:05 2006年7月9日12:05
I wanna reset my ZXDSL 831 ADSL Modemnマイzxdslをリセットしたい831 adsl modemn
Plz tell me the way how to reset itのplzの道を教えてそれをリセットする方法
I need to do that right now私は今すぐこの操作を行う必要があります
Best Rgdsベストrgds
dugger(vincitore)ダガー( vincitore )
December 19th, 2006 14:54 2006年12月19日14:54
[...] Re: Help me retrieve my password Try this link… Change and Reset MySQL root Password [...]再:私のパスワードを取得しようと手伝ってこのリンクを… MySQLのrootのパスワードを変更し、リセット
April 23rd, 2007 08:23 2007年4月23日08:23
[...] Change and Reset MySQL root Password » My Digital Life (tags: mysql administration) No Tags Gelesen: 2 / heute: 2 [...] MySQLのrootのパスワードを変更し、リセット[...] »私のデジタルライフ(タグ: MySQLの管理)のタグgelesen : 2 / heute : 2 [...]
May 5th, 2008 16:52 2008年5月5日16:52
[...] judulnya), setelah googling cuma dapat cara untuk mereset dan mengganti password MySQL di UNIX-like di sini. [...] judulnya ) 、 setelah cuma googlingの手段のようにするべきであるダンmenggantiパスワードmereset MySQLのディUNIXライクなディsini 。 Wah, perlu sedikit modifikasi ni … Berikut cara2 yang saya lakukan: 1.ワウ、 perlu sedikit modifikasiに… berikutのヤンcara2沙耶lakukan : 1 。 Kill proses MySQL [...]殺すproses MySQLの[...]
July 3rd, 2008 05:46 2008年7月3日05:46
On ubuntu, command is mysqld_safe –-skip-grant-tables &上ubuntu 、コマンドは、 mysqld_safeのに-s kip-助成金-テーブル&
Extra dash is required so mysql can parse it correctly.余分なダッシュが必要なため、 MySQLが正しく解釈できるようです。