mysqlcollation

I have that error"#1273 - Unknown collation: 'utf8mb4_0900_ai_ci'"


CREATE TABLE `payment_methods` (
  `payment_method_id` tinyint(4) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  PRIMARY KEY (`payment_method_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

Solution

  • CREATE TABLE payment_methods 
        ( payment_method_id tinyint(4) NOT NULL AUTO_INCREMENT, 
          name varchar(50) NOT NULL, 
          PRIMARY KEY (payment_method_id) 
        ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
    

    NOTE: COLLATE=utf8mb4_0900_ai_ci replace with COLLATE=utf8mb4_general_ci

    REFER: https://www.freakyjolly.com/resolved-when-i-faced-1273-unknown-collation-utf8mb4_0900_ai_ci-error/#.X2jHBGgzZPY