Q:

Refreshing Data For MySQL Command Line Without Exiting and Re-Entering

On Linux, I thought my MySQL queries were somehow not working, because a query would not show any progress in the amount of data being entered into a table. Is there a way the data available to the MySQL command line can be refreshed without exiting and re-entering the command line?
I have been searching around, but so far have only seen running mysql -e and putting that into a bash loop. I like to stay in the MySQL command line and run other commands like describe tables.

A:

What you're seeing is probably the result of a long-running REPEATABLE-READ transaction. Until you begin a new transaction, you can see only data that was committed at the time you started your current transaction.
Normally, the mysql client operates in autocommit mode. That is, every SQL statement implicitly starts and commits its own transaction. In this mode, you should always see current data every time you query. You apparently are not using autocommit mode.
You can turn on autocommit:
mysql> SET SESSION autocommit=1;

Or you can start a new transaction at your convenience:
mysql> BEGIN;

Another option is to operate within a READ-COMMITTED transaction. This means your transaction does not need to preserve a repeatable view of data from the time you started your transaction. It always views the most recently committed changes, even while your transaction is ongoing.
mysql> SET SESSION tx_isolation='READ-COMMITTED';
mysql> BEGIN;

(Note: MySQL 8.0.3 changed the name of tx_isolation to transaction_isolation.)
The link @JimmyB posted in a comment above about transaction isolation levels is helpful reading.

