The ban does not include city golf courses.
Violators face a $100 fine for a first offense and a $200 fine for a second offense within a year. All subsequent violations within one year of a previous offense will cost $500.
The ban will take effect 31 days after the Long Beach mayor signs the ordinance.
The Associated Press contributed to this report.