Analysis of shell script Associated with mysql Database example
The following mainly brings you shell script associated with mysql database example analysis, I hope that shell script associated with mysql database example analysis can bring you practical use, which is also the main purpose of my editing this article. All right, don't talk too much nonsense, let's just read the following.
1. Connect to mysql database
The way to connect to a database in shell is simple, just specify the user name, password, and database name of the connection, and then enter the statement of mysql through redirection, as shown below:
The copy code is as follows:
Mysql-u USERNAME-p PASSWORD DATABASENAME