This is an article discussing about how to solve a specific MySQL Error Message. The error message is in the title of this article. To be more specific, the error message is ‘ERROR 1292 (22007) : Incorrect datetime value: ‘0000-00-00 00:00:00′ for column’. It can appear when a restore process of a database fails. It is in the following output of command execution :
[root@hostname ~]# mysql -uroot db_app < db_app.sql
ERROR 1292 (22007) at line XXX: Incorrect datetime value: '0000-00-00 00:00:00' for column 'dateupdate' at row 1
As in the above output command execution, the error message appears. It happens in the middle of restoring a database. In order to solve the problem, there is a specific setting of the sql_mode. The following is the step to solve it :
1. First, logging in to MySQL command console.
This is an article where the main discussion or its written to solve the error problem specified in the title of this article. The article is triggered upon inserting new rows to a table in a database which all the data are extracted fro another table located in another database. For more information, below is the actual output shown as an error message upon inserting new records :
user@hostname:~$ mysql -uroot -p
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2537
Server version: 5.7.20 MySQL Community Server (GPL)
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> insert into newdb.table1 from select * from olddb.table1;
ERROR 1265 (01000): Data truncated for column 'column_name' at row 1
In this article, as shown in the title of the article which is how to change definer inMySQL views, this article is written to show how to change definer in MySQL views. At first, definer of a file is actually specified in the MySQL Database dump file where it can actually be changed. It is quite simple to change it if the prerequisite on accessing MySQL Database Server can be fulfilled.
The prerequisite can be specified as follows :
This is an article where the focus is about executing a specific query in MySQL Database Server. The specific query itself is a query to drop column in MySQL Database Server. In order to drop a specific column in a MySQL Database Server, the following are steps to be able to achieve it via command line :
1. Make sure MySQL Database Server has already installed.
2. Make sure the service of MySQL Database Server is active by checking the status of the service whether it is running or not. To be able to check it, just read the following article titled ‘Check MySQL Service Status’ in this link.