Tag: MySQL
-
Post Views: 14 1. Mysql error: 1055 – expression #2 of select list is not in group by clause and contains nonaggregated columnmodel.group_idwhich is not functionally depend on columns in group by cluse; as shown in Figure 1 2. Execute the first SQL clause, no error is reported, and the query result is empty. as shown in Figure 2 3.…
-
Post Views: 13 1. The comments of the table are garbled. as shown in Figure 1 2. The comments of the fields are garbled. as shown in Figure 2 3. The values in the table are garbled. as shown in Figure 3 4. Add at the beginning of the sql file: set names utf8mb4; 5. Table comments, field comments, and…
-
Post Views: 14 1. The external network address of the Alibaba Cloud RDS MySQL instance has been applied to connect. as shown in Figure 1 2. Failed to connect in Navicat for MySQL, error: 2003 – CANT connect to mysql server onRM-BP(10060 “Unknown Error”). as shown in Figure 2 3. To access RDS through the external network, you need to…
-
Post Views: 12 1. In CakePHP v2.6.4, an error is reported: sqlstate[HY000][2002]connection timed out. as shown in Figure 1 2. Print the database connection information and find that the host address is the intranet IP, and the container cannot be accessed 3. Adjust to the external network IP, print the database connection information, and the container can be accessed normally.…
-
Post Views: 21 1. At this stage, there is a new requirement, and it is necessary to do some initial data work for the product when deploying the product. Prepare the corresponding SQL file in advance. Since multiple SQL statements need to be executed, and subsequent SQL statements depend on the primary key ID generated by the previous SQL statement.…
-
Post Views: 13 1. In Yii 2.0, the realization of health check, a colleague implemented a version before, I feel that it is necessary to adjust it again 2. The analysis code found that yii::$app->db->getisActive() is unnecessary. View the source code of the corresponding method separately. The related implementation of $this->pdo in getIsActive() already exists in open() . 3. Analyze…
-
Post Views: 60 1. In Navicat for MySQL, when editing the database, the database name cannot be edited, as shown in Figure 1 2. Rename the database in phpmyadmin, it can be seen that phpmyadmin can support the operation of direct rename, as shown in Figure 2 3. Prepare to rename g-s-yii2-app-advanced-test in Navicat for mysql, and create a new…
-
Post Views: 14 1. Perform database migration in Yii 2.0: the MediumText type of MySQL. The four text types are TinyText, Text, MediumText, and LongText. Only supported: text 2. Reference file: \vendor\yiisoft\yii2\db\schemabuildertrait.php, copy to \console\db\mysql\schemabuildertrait.php, refer to the implementation of the text type, add support for tinytext, mediumtext, and longtext 3. In the database migration file, refer to the newly…
-
Post Views: 15 1. Analysis of the SQL based on EXPLAIN is as follows, as shown in Figure 1 2. The index of the PA_plan_task table is shown in Figure 2 3. After adding the index: IDX_GROUP_ID, IDX_CREATE_USER_ID, IDX_IS_NOT_ISOLATED, the index of the PA_PLAN_TASK table is shown in Figure 3 4. Analysis of the first SQL based on EXPLAIN is…
-
Post Views: 15 1. The index of the PA_CONFIG_COLUMN table is shown in Figure 1, and the index of the PA_CONFIG_COLUMN_USER table is shown in Figure 2 2. Analysis of the first SQL based on Explain is as follows, type: displays the access type, which is a more important indicator, and the result value from good to bad is: system…