The California Gold Rush wasn't the first American gold rush. The first one was 50 years prior in North Carolina. That one produced enough gold to be used as currency for 30 years.
In 1848 there were less than 800 non native Americans in California (roughly 150,000 Native Americans and 6,500 Californios (Spanish/Mexian)). Mid 1850s, there were already over 300,000 new arrivals. Within 20 years, more than 100,000 Native Americans perished due to mining related incidents or just plain murder. The Native Americans were enslaved and used as a free source of labor and a makeshift militia to defend territory from opposition.
One large group of immigrants were from China with over 25,000.
The huge influx in immigrants and dwindling amount of gold available caused the government to pass a Foreign Miner's tax, which levied a monthly fee of $20 on non citizens (more than $500 in today's money). This was later replaced with one exclusively against chinese, charging $2 a month.
Parts of San Francisco were built out of ships abandoned by prospectors (a person who searches for mineral deposits).
Participating in the gold rush became very costly due to supply and demand. Boots could cost up to $2,500 and a pound of coffee went for more than $100. Stuck in a remote region, far from home, they were left with no other option but to pay the hefty costs. Therefore being a merchant during the gold rush would have been alot more lucrative and easy. The only risk would have been bandits.
John Sutters, a person whose land would become synonymous with the California Gold Rush, shockingly didn't end up rich. His workers abandoned him to search for gold and his property was destroyed by prospectors looking for gold. Thousands became rich off his former land, but a bitter (and poor) Sutter retired to Pennsylvania and died.