How to migrate users from old to new installation?

I have an old installation with some issues (it is working fine but I have an old PicoCMS installation that will cause problems when I update to the new version). I also want a safer installation.

Instead or trying to repair the I have made a new installation. I now want to migrate the users so that they do not need to register new passwords.

I have tried to migrate the Mariadb table oc-users with this method found here

On old set up I do
mysqldump -u username -p databasename tableName > path/example.sql

I transfer the example.sql to the new setup and do
mysql -u username -p databasename < path/example.sql

After I did this I could not access the site from the browser. I checked the Mariadb from the terminal and found no errors.

In the description of the method is written: “This command needs an sql file containing data in form of insert statements for table tableName . All the insert statements will be executed and the data will be loaded.”

How can I make these INSERT statements?
Did I something wrong? Any other recommended method?