have you tried dpkg-reconfigure?
> When installing mariadb-server-5.5 with existing MySQL databases, the user > is given a choice of whether to accept a one-way migration. > > If the user refuses to accept the one-way migration, the option is never > offered again, even when the user decides it's time to migrate and re-installs > the package. > > Once chosen, the preinst script always aborts the installation.