Common MySQL database errors and solutions

"Shiji data is secure and high-quality resources are shared." Database security refers to the completeness, authenticity, reliability and availability of database data. The database is also a software system. Like other software systems, it also needs protection. Certain technologies and certain security management strategies need to be adopted to ensure that the data in the database is not leaked, destroyed, modified or deleted. This article lists common MySQL database errors and solutions.

1. Common errors and solutions in MySQL views and indexes

title

1.1Failed to create view

【Problem Description】

When using CREATE VIEW to create a view, the command prompt as shown in Figure 1 reports an error "ERROR 1046 (3D000): No database selected".

■ Figure 1 View creation failure error diagram

【solution】

Because the current database was not specified before creating the view, MySQL was unable to determine in which database the view should be created and reported an error. You should use the "USE db_study;" SQL statement to specify the database before using the statement.

1.2,Building unique index failure<

Guess you like

Origin blog.csdn.net/qq_41640218/article/details/134036685