Hot answers tagged

1

Apparently the fix I did was pretty brute force and might be dumb, but it works anyway. I did sudo find / -iname "pgdg95". Ran rm -rf on all the folders and files listed. Repeated the steps listed above and it installed fine. This answer helped me to get it up and running.Also had to change hba.conf.


1

It sounds as the underlying disks are busy. The problem in restoring a large database is that each (group of) INSERT requires a flush/sync operation, which is very slow on mechanical disks (a 7200 RPM disk is in the order of ~100 IOPS). To hasten the restore, you had to temporarily instruct MySQL/MariaDB to not issue flushes/syncs. To do that, interrupt the ...


1

If your underlying storage is plain old disks, for a 25GB-on-disk MySQL database, that's quite normal to experience hours-long restore - especially for some badly structured dbs (lots of tuples, indexes, etc.). For a start compress your dump, that saves tons of I/Os and puts less stress on cache memory : mysqldump foo |gzip >foo.sql.gz zcat foo.sql.gz ...


1

Mysqldump won't have any options to dump only on views.The below command will help you to take the backup of only views. mysql -uroot -pPassword INFORMATION_SCHEMA --skip-column-names -e "select table_name from tables where table_type = 'VIEW' and table_schema = 'sakila'" | xargs mysqldump -u root -pPassword sakila > only_views.sql



Only top voted, non community-wiki answers of a minimum length are eligible