I need to store ~50,000,000 values which contains only id (auto-increment) and varchar(32). And then show the random value for each pageload. Of course I wouldn’t use RAND().
So, is MySQL good for it if I work with PHP? Or should I learn some other database which is more optimal?
50 million rows is a rounding error for the mainstream RDBMSes.
Use MySQL if you know it, or pick one you’re comfortable with.
To pick one row out of 50 million, you generate a number between 1 and 50 million and pick that single row. So why not use RAND as a number generator? (Edit: but not in the ORDER BY as per redShadow’s comment on question)