なんらかの原因で管理者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;
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;
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数の数が違うと怒られた場合はテーブルの中身を確認して数をあわせてください。
cost atorvastatin 80mg buy atorvastatin no prescription buy atorvastatin 80mg
buy cipro 500mg generic - cipro 1000mg cheap cost augmentin 375mg
cipro 1000mg price - cephalexin pill order augmentin 1000mg pills
order metronidazole 200mg - buy azithromycin 250mg online cheap zithromax medication
ciplox 500mg tablet - order tinidazole without prescription erythromycin 250mg brand
valtrex cost - acyclovir 800mg drug order acyclovir 800mg generic
purchase metronidazole - cleocin where to buy zithromax 250mg cheap
buy generic ampicillin purchase vibra-tabs cheap amoxicillin pills
furosemide order - coumadin sale captopril over the counter
order glucophage for sale - how to get duricef without a prescription buy lincomycin tablets
retrovir online buy - buy epivir 100 mg online zyloprim 100mg drug
buy clozaril 50mg generic - order altace 10mg sale pepcid order online
quetiapine us - fluvoxamine 100mg ca buy eskalith tablets
order anafranil 50mg generic - purchase amoxapine pills doxepin for sale
hydroxyzine pills - cost escitalopram 20mg endep 25mg generic
buy amoxil online cheap - buy amoxicillin 250mg without prescription buy cipro without prescription
augmentin price - buy cipro 500mg online cheap cipro 500mg canada
buy clindamycin generic - terramycin 250 mg over the counter buy chloromycetin paypal
order azithromycin - order generic tetracycline 250mg order ciprofloxacin 500mg for sale
order ventolin - purchase promethazine sale theophylline ca
desloratadine drug - zaditor 1mg usa order albuterol generic
generic depo-medrol online - oral claritin 10mg buy astelin
glyburide price - buy cheap dapagliflozin forxiga 10mg usa
purchase prandin without prescription - buy empagliflozin 10mg without prescription order jardiance 10mg for sale
order terbinafine pill - order terbinafine 250mg without prescription purchase grifulvin v generic
buy ketoconazole 200 mg sale - purchase mentax generic sporanox online buy