LoginSignup
0
0

More than 3 years have passed since last update.

Mysqlにデータを突っ込もうとするとエラーになる

Posted at

自分用メモ

DBに今あるTableを削除してMysqlWorkbenchからデータを突っ込もうとするとエラーになった。

エラー内容

Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode, toggle the option in Preferences -> SQL

解決方法

SET SQL_SAFE_UPDATES = 0;
ALTER TABLE `tablename` auto_increment = 1;

一時的にSAFE_UPDATEを無効にして、オートインクリメントを初期化する。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0