In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "mysqlimport import data report error how to do", in the daily operation, I believe that many people have doubts about how to do mysqlimport import data report error. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful for you to answer the doubt of "mysqlimport import data report error how to do". Next, please follow the editor to study!
MySQL Version 5.5.8
Import and export of load data related data
Export data:
Mysql > use DB_SPLIT_LOG
Mysql > select * from t_log_info into outfile "/ tmp/log_info.txt"
Clear the data:
Mysql > truncate table t_log_info
Import data:
Law one:
Mysql > load data infile "/ tmp/log_info.txt" into table t_log_info
Query OK, 4 rows affected (0.06 sec)
Records: 4 Deleted: 0 Skipped: 0 Warnings: 0
Law II:
Clear the data first:
Mysql > truncate table t_log_info
Root@192.168.12.160:tmp# mysqlimport-S / tmp/mysql3456.sock-pxxx DB_SPLIT_LOG t_log_info / tmp/log_info.txt
Mysqlimport: Error: File'/ opt/mysql558/DB_SPLIT_LOG/t_log_info' not found (Errcode: 2), when using table: t_log_info
As with the above error message, it was later found to be a grammatical error. Mysqlimport only needs to specify the database DB_SPLIT_LOG and does not need to follow the table name t_log_info.
Root@192.168.12.160:tmp# mysqlimport-S / tmp/mysql3456.sock-pxxx DB_SPLIT_LOG / tmp/log_info.txt
Mysqlimport: Error: Table 'DB_SPLIT_LOG.log_info' doesn't exist, when using table: log_info
As a result, there is another error, and the analysis shows that after mysqlimport specifies the database, how do you know which table the data belongs to? According to the file name! Meet the first point. 'The previous file name is both the table name
Root@192.168.12.160:tmp# mv / tmp/log_info.txt / tmp/t_log_info.txt
Root@192.168.12.160:tmp# mysqlimport-S / tmp/mysql3456.sock-pxxx DB_SPLIT_LOG / tmp/t_log_info.txt
DB_SPLIT_LOG.t_log_info: Records: 4 Deleted: 0 Skipped: 0 Warnings: 0
Import succeeded!
In addition, the essence of mysqlimport is to call the mysql load data command. If you need to prove that you can open binlog, then perform the corresponding operation to check.
At this point, the study on "how to report errors in mysqlimport import data" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.