[Magento] 管理者IDをデータベースに直接作成する

なんらかの原因で管理者IDが使えなくなってしまった時はデータベースへ直接IDを生成する必要があります。そんなときはこちらのクエリーを実行してください。

まずはadmin_user テーブルを更新

INSERT INTO admin_user
SELECT
(select max(user_id) + 1 from admin_user) user_id,
"xxxxxx" firstname, //ご自信のものに変更してください
"xxxxxx" lastname, //ご自信のものに変更してください
"xxxxxx" email, //ご自信のものに変更してください
"xxxxxx" username, //ご自信のものに変更してください
"3934e5e2ac03e708b1c62b8dbb44cf9e" password, //ご自信のものに変更してください
NOW( ) created,
NULL modified,
NULL logdate,
0 lognum,
0 reload_acl_flag,
1 is_active,
(SELECT MAX(extra) FROM admin_user WHERE extra IS NOT NULL) extra,
NULL rp_token,
NOW() rp_token_created_at,
0 failures_num,
NULL first_failure,
NULL lock_expires;

MD5形式のパスワードを取得するには書きのサイトをご利用ください。無料です。
http://www.miraclesalad.com/webtools/md5.php

次にadmin_rollテーブルを更新

INSERT into admin_role
SELECT
NULL role_id,
(SELECT role_id FROM admin_role WHERE role_name = 'Administrators') parent_id,
2 tree_level,
0 sort_order,
'U' role_type,
(SELECT user_id FROM admin_user WHERE username = 'USERNAME') user_id, //ご自信のものに変更してください
'USERNAME' role_name, //ご自信のものに変更してください
1 gws_is_all,
null gs_websites,
null gws_store_groups;
magentoのバージョンによってFieldの数が若干違うようです。こちらの例はMagento 1.9.1でのやり方のため、もしクエリー実行時にfield数の数が違うと怒られた場合はテーブルの中身を確認して数をあわせてください。


  1. Pgjugs より:

    cost atorvastatin 80mg buy atorvastatin no prescription buy atorvastatin 80mg

  2. Iiefne より:

    buy cipro 500mg generic - cipro 1000mg cheap cost augmentin 375mg

  3. Gafbtd より:

    cipro 1000mg price - cephalexin pill order augmentin 1000mg pills

  4. Okpsxl より:

    order metronidazole 200mg - buy azithromycin 250mg online cheap zithromax medication

  5. Lgyntr より:

    ciplox 500mg tablet - order tinidazole without prescription erythromycin 250mg brand

  6. Dwgwly より:

    valtrex cost - acyclovir 800mg drug order acyclovir 800mg generic

  7. Wejjlz より:

    purchase metronidazole - cleocin where to buy zithromax 250mg cheap

  8. Lvgiyl より:

    buy generic ampicillin purchase vibra-tabs cheap amoxicillin pills

  9. Effudw より:

    furosemide order - coumadin sale captopril over the counter

  10. Xrlgvc より:

    order glucophage for sale - how to get duricef without a prescription buy lincomycin tablets

  11. Phaubr より:

    retrovir online buy - buy epivir 100 mg online zyloprim 100mg drug

  12. Tmkmrh より:

    buy clozaril 50mg generic - order altace 10mg sale pepcid order online

  13. Urrbkp より:

    quetiapine us - fluvoxamine 100mg ca buy eskalith tablets

  14. Nrlexo より:

    order anafranil 50mg generic - purchase amoxapine pills doxepin for sale

  15. Eqrqdo より:

    hydroxyzine pills - cost escitalopram 20mg endep 25mg generic

  16. Jklusc より:

    buy amoxil online cheap - buy amoxicillin 250mg without prescription buy cipro without prescription

  17. Jxbpcb より:

    augmentin price - buy cipro 500mg online cheap cipro 500mg canada

  18. Fjangz より:

    buy clindamycin generic - terramycin 250 mg over the counter buy chloromycetin paypal

  19. Zmjcjc より:

    order azithromycin - order generic tetracycline 250mg order ciprofloxacin 500mg for sale

  20. Sxhlzp より:

    order ventolin - purchase promethazine sale theophylline ca

  21. Tuneav より:

    desloratadine drug - zaditor 1mg usa order albuterol generic

  22. Mmrnix より:

    generic depo-medrol online - oral claritin 10mg buy astelin

  23. Abpyvr より:

    glyburide price - buy cheap dapagliflozin forxiga 10mg usa

  24. Zxfnbt より:

    purchase prandin without prescription - buy empagliflozin 10mg without prescription order jardiance 10mg for sale

  25. Fkluao より:

    order terbinafine pill - order terbinafine 250mg without prescription purchase grifulvin v generic

  26. Rxqxvm より:

    buy ketoconazole 200 mg sale - purchase mentax generic sporanox online buy

comment

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

© 2024 みる米技術部 Powered by AFFINGER5