Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to export Users using PHPMyAdmin

Does anyone know how to export users using PHPMyAdmin? I've got the entire structure ported over to a new server but the users didn't make it.

I understand it involves the mysql user table, but it would be awesome if there was a non-destructive way so I can be assured it won't mess up users on the new server.

like image 393
wajiw Avatar asked Jan 26 '26 09:01

wajiw


1 Answers

You could use SQL; try using SELECT ... INTO OUTFILE syntax to load your users into a file on your system.

You might have to fudge the primary keys but you can do this by editing the file. For instance, as long as you have fewer than 1000 users, you can add 1000 to each primary key so they don't conflict with users in the new database. You can do this with a script, or with vim, or even with Excel.

Then copy the file to your other server and use LOAD DATA INFILE.

like image 125
Fragsworth Avatar answered Jan 27 '26 21:01

Fragsworth



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!