mysql: assign opportunities to user based on parent account

Query to Select List:   SELECT * FROM opportunities LEFT JOIN accounts_opportunities ON accounts_opportunities.opportunity_id = LEFT JOIN accounts ON accounts_opportunities.account_id = WHERE accounts.assigned_user_id = ‘7077c616-4f2c-f966-d9b6-5581807bae86’;     UPDATE Query: UPDATE opportunities x LEFT JOIN accounts_opportunities y ON y.opportunity_id […]

mysql: backup databases

Backups all databases mysqldump -u [user] -p[password] –all-databases > [filename].sql   specific databases mysqldump -u [user] -p[password] [database_name] > [filename].sql   specific database but omitting specific tables mysqldump -u [user] -p[password] [database_name] –ignore-table=db1.tbl1 –ignore-table=db2.tbl1 > [filename].sql   restore mysql -u […]