Lessaire
Omniscient Hypervisor
Perform these in MySQL command shell or phpMyAdmin SQL tab within root of selected database:
then change your config file and test it. if for some reason it doesn't work you can revert with this:
and if does work and you may freely drop the old column if you wish:
ALTER TABLE `accounts` CHANGE `password` `plainpassword` VARCHAR( 255 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ;
ALTER TABLE `accounts` ADD `password` CHAR( 40 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL AFTER `name` ;
UPDATE accounts SET password=SHA1(plainpassword) ;
then change your config file and test it. if for some reason it doesn't work you can revert with this:
ALTER TABLE `accounts` DROP `password` ;
ALTER TABLE `accounts` CHANGE `plainpassword` `password` VARCHAR( 255 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ;
and if does work and you may freely drop the old column if you wish:
That's it. Hope it helps someone.ALTER TABLE `accounts` DROP `plainpassword` ;
Last edited: