MySQL Syntax error when trying to reset Joomla password
Posted
by
Arthur
on Server Fault
See other posts from Server Fault
or by Arthur
Published on 2012-06-28T05:40:00Z
Indexed on
2012/06/28
9:17 UTC
Read the original article
Hit count: 304
I'm trying to reset my Joomla admin password by executing the following code in MySQL:
INSERT INTO `jos_users` (`id`,`name`, `username`, `password`, `params`)
VALUES (LAST_INSERT_ID(),'Administrator2', 'admin2',
'd2064d358136996bd22421584a7cb33e:trd7TvKHx6dMeoMmBVxYmg0vuXEA4199', '');
INSERT INTO `jos_user_usergroup_map` (`user_id`,`group_id`)
VALUES (LAST_INSERT_ID(),'8');
When I attempt to execute it, I get the following error:
Failed to execute SQL : SQL INSERT INTO `jos_users` (`id`,`name`, `username`, `password`, `params`) VALUES (LAST_INSERT_ID(),'Administrator2', 'admin2',
'd2064d358136996bd22421584a7cb33e:trd7TvKHx6dMeoMmBVxYmg0vuXEA4199', ''); INSERT INTO
`jos_user_usergroup_map` (`user_id`,`group_id`) VALUES (LAST_INSERT_ID(),'8'); failed :
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO `jos_user_usergroup_map` (`user_id`,`group_id`) VALUES (LAST_INSERT_' at line 1
Could someone tell me where my Syntax might be wrong? I'm using MySQL version 5.0.95.
© Server Fault or respective owner