How to program a MySQL trigger to insert row into another table?

drop table if exists comments; create table comments ( comment_id int unsigned not null auto_increment primary key, user_id int unsigned not null ) engine=innodb; drop table if exists activities; create table activities ( activity_id int unsigned not null auto_increment primary key, comment_id int unsigned not null, user_id int unsigned not null ) engine=innodb; delimiter # … Read more

What happens when auto_increment on integer column reaches the max_value in databases?

Jim Martin’s comment from ยง3.6.9. “Using AUTO_INCREMENT” of the MySQL documentation: Just in case there’s any question, the AUTO_INCREMENT field /DOES NOT WRAP/. Once you hit the limit for the field size, INSERTs generate an error. (As per Jeremy Cole) A quick test with MySQL 5.1.45 results in an error of: ERROR 1467 (HY000): Failed … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)