Skip to content

Instantly share code, notes, and snippets.

@sintret
Last active January 5, 2022 18:17
Show Gist options
  • Select an option

  • Save sintret/00ef4f6d1a0aed79169e073a2ec117b3 to your computer and use it in GitHub Desktop.

Select an option

Save sintret/00ef4f6d1a0aed79169e073a2ec117b3 to your computer and use it in GitHub Desktop.

Revisions

  1. sintret revised this gist Jan 5, 2022. 1 changed file with 15 additions and 1 deletion.
    16 changes: 15 additions & 1 deletion mysql
    Original file line number Diff line number Diff line change
    @@ -4,4 +4,18 @@ SELECT @@GLOBAL.sql_mode;
    CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'total' cannot be null
    Create mysqlId in the following way:
    sql_mode= ""
    SET sql_mode = '';
    SET sql_mode = '';


    run mysql in background
    https://faun.pub/restore-mysql-dump-in-the-background-82cd01be854b
    First, start your restore process using the usual MySQL command
    ubuntu@ip-172-31-2-182:~$ mysql -u remote -p snappoint < snappoint.sql
    when it is prompt, enter the relevant password at the MySQL command prompt for the mentioned user
    Press Ctrl + z to suspend the current process ( MySQL Process which just started )
    Then Run the bg command to move the above-suspended process to the background and resume its operation
    ubuntu@ip-172-31-2-182:~$ bg
    [1]+ mysql -u remote -p snappoint < snappoint.sql &
    Run the jobs command to see the list of running processes in the current shell session, in my case I have only one process which is my MySQL
    ubuntu@ip-172-31-2-182:~$ jobs
    [1]+ Running mysql -u remote -p snappoint < snappoint.sql &
  2. sintret revised this gist Dec 28, 2021. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions mysql
    Original file line number Diff line number Diff line change
    @@ -1,2 +1,7 @@
    SHOW VARIABLES;
    SELECT @@GLOBAL.sql_mode;

    CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'total' cannot be null
    Create mysqlId in the following way:
    sql_mode= ""
    SET sql_mode = '';
  3. sintret created this gist Dec 28, 2021.
    2 changes: 2 additions & 0 deletions mysql
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    SHOW VARIABLES;
    SELECT @@GLOBAL.sql_mode;