Tag Info

Hot answers tagged

2

cat 1.sql | grep -v "DROP TABLE" | mysql --force Assuming no other string contains drop commands this should work.. Updated: use --force to ignore errors by CREATE TABLE.


2

You can see if a dump is running from within PostgreSQL by checking for pg_dump or pg_dumpall as the application_name in pg_stat_activity. It's not perfect though, since the client has to connect to each DB in turn, so there might be a period with no visible connection. I haven't verified whether pg_dumpall maintains its connection throughout, while running ...


1

Your max_connect_errors is way too low. You have it at 1000. That means after 1000 consecutive connect failures, you cannot connect to MySQL any longer. Your status variable Aborted_connects should be the dead giveaway if it climbs fast. When you can no longer connect to MySQL even with bunch of open DB Connections, you would have to execute FLUSH HOSTS; ...


1

From My Oracle support, Doc ID 1304727.1 Red Hat Enterprise Linux 7 - 11.2.0.4 only Oracle Unbreakable Enterprise Kernel:3.8.13-35.3.1.el7uek.x86_64 or higher Red Hat compatible kernel: 3.10.0-123.el7.x86_64 or higher So, unless you are installing 11.2.0.4, you will have compatibility issues on RHEL7. Either install 11.2.0.4 and up on ...


1

If you're running on Linux (any with awk), you could run: awk '!/^DROP TABLE IF EXISTS/{print}' db_dump_sql | mysql -u $user -p --force --database=$db PD: I added --force that means: --force, -f Continue even if an SQL error occurs. Test: root@onare:/home/onare# touch db_dump_sql root@onare:/home/onare# echo "DROP TABLE IF EXISTS/" >> ...



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