how to use mysql shell in windows 1

how to use mysql shell in windows

mysqlsh

Here is what the above code is Doing:
1. It’s importing the mysqlsh module.
2. It’s creating a new MySQL Shell session object.
3. It’s connecting to the MySQL Server using the session object.
4. It’s creating a new schema called ‘test’ using the session object.
5. It’s creating a new table called ‘t1’ in the ‘test’ schema using the session object.
6. It’s inserting a new row into the ‘t1’ table using the session object.
7. It’s selecting all rows from the ‘t1’ table using the session object.
8. It’s printing the result of the SELECT statement.
9. It’s closing the session object.

Similar Posts