


How to implement mysql batch file to continue execution after an error_MySQL
Nov 30, 2016 pm 11:59 PMWhen upgrading batch sql scripts, due to various non-standard writing and non-repeatable execution, we usually hope that the sql script will not be terminated after an error occurs, but the execution will be completed. Although these problems can be solved by writing repeatable mysql stored procedures such as add_column/drop_column, in many cases, the ready-made version will take a long time to transition, so this requirement is still necessary.
It’s actually very simple, just add the --force command line option, as follows:
mysql -uroot -ppassword - -force [db] < patch.sql
The above is the entire implementation method of mysql batch file continued execution after an error brought to you by the editor. I hope you will support it~

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

PHP's big data structure processing skills

How to optimize MySQL query performance in PHP?

How to use MySQL backup and restore in PHP?

What are the application scenarios of Java enumeration types in databases?

How to insert data into a MySQL table using PHP?

How to fix mysql_native_password not loaded errors on MySQL 8.4

How to use MySQL stored procedures in PHP?

Performance optimization strategies for PHP array paging
