database-backups
Minimum GRANTs needed by mysqldump for dumping a full schema? (TRIGGERs are missing!!)
Assuming by full dump you also mean the VIEWs and the EVENTs, you would need: GRANT USAGE ON *.* TO ‘dump’@’%’ IDENTIFIED BY …; GRANT SELECT, LOCK TABLES ON `mysql`.* TO ‘dump’@’%’; GRANT SELECT, LOCK TABLES, SHOW VIEW, EVENT, TRIGGER ON `myschema`.* TO ‘dump’@’%’; and if you have VIEWs that execute a function, then unfortunately … Read more
How to take MySQL database backup using MySQL Workbench?
For Workbench 6.0 Open MySql workbench. To take database backup you need to create New Server Instance(If not available) within Server Administration. Steps to Create New Server Instance: Select New Server Instance option within Server Administrator. Provide connection details. After creating new server instance , it will be available in Server Administration list. Double click … Read more
How to solve privileges issues when restore PostgreSQL Database
To solve the issue you must assign the proper ownership permissions. Try the below which should resolve all permission related issues for specific users but as stated in the comments this should not be used in production: root@server:/var/log/postgresql# sudo -u postgres psql psql (8.4.4) Type “help” for help. postgres=# \du List of roles Role name … Read more
Postgresql – backup database and restore on different owner?
You should use the –no-owner option, this stops pg_restore trying to set the ownership of the objects to the original owner. Instead the objects will be owned by the user specified by –role createdb -p 5433 -T template0 db_name pg_restore -p 5433 –no-owner –role=owner2 -d db_name db_name.dump pg_restore doc
Export and Import all MySQL databases at one time
Export: mysqldump -u root -p –all-databases > alldb.sql Look up the documentation for mysqldump. You may want to use some of the options mentioned in comments: mysqldump -u root -p –opt –all-databases > alldb.sql mysqldump -u root -p –all-databases –skip-lock-tables > alldb.sql Import: mysql -u root -p < alldb.sql