How to set the
SQL mode using the dos command in windows requires a few steps.
1. Open the command window through cmd. Sometimes during the opening process, the "inaccessible" situation occurs. This is caused by insufficient permissions. The solution is to search for cmd in the search window and then right-click to open it as an administrator.
2. Enter the command "net start MYSQL", please note that the MYSQL here should be written according to the specific service name, otherwise there will be "service name invalid" error.
3. How to view the service name involved in the second step, that is, open the "task manager"-"service" list, you can view the specific service name.
4. Go to the installation directory of mysql, find the bin folder, and open the database according to the dos command "mysql -hlocalhost -uroot -proot".
5. After opening the database, you can perform related sql operations, for example, you can view the default sql mode of the mysql database.
6. Set the sql mode.
7. This completes the mode setting.