EDIT: never mind, I should have searched the forums first.Problem is solved here
I ran into a bit of trouble with my web2py/mySQL db today (couldn't insert a new record because a foreign key constraint kept failing). I couldn't figure out the problem, so I just started a fresh database and pointed web2py to it, which created the correct (empty) tables.
But, I couldn't figure out how to get my data from the old database into the new one. (Eventually I pointed web2py temporarily back to the old db, downloaded all the tables individually as .csv, pointed web2py back to the new db, and imported all the tables as .csv).
Is there an automated way to backup the database? I've seen info online for mysqldump but when I tried it, it said
mysqldump: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
I also tried SELECT * INTO OUTFILE but it said I didn't have sufficient privileges. Thanks.