Trouble running create-databases.sql

I just got started on the SQL course and right off the start when I tried to run create-databases.sql, I got an error message saying:

21:04:47 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 Error Code: 1273. Unknown collation: ‘utf8mb4_0900_ai_ci’ 0.000 sec

This is right at the very beginning and I have no idea how to fix it. Anyone got a solution to this? Thanks in advance everyone!

Hi RPH,

Try changing:
payment_method_id tinyint(4), to
payment_method_id integer

I have never seen tinyint, integer, or any number type qualified with a size. E.g. tinyint(4).
Size qualification is used with varchar, E.g. varchar(20).

Here is an example:
drop table person;
create table person
(
id integer AUTO_INCREMENT PRIMARY KEY,
birth_date timestamp,
location varchar(255),
name varchar(255)
);
INSERT INTO PERSON (NAME, LOCATION, BIRTH_DATE ) VALUES(‘Pieter’, ‘Amsterdam’,sysdate());
INSERT INTO PERSON (NAME, LOCATION, BIRTH_DATE ) VALUES(‘Jerry’, ‘Pittsburgh’,sysdate());

NOTE: You do NOT give a value to an AUTO_INCREMENT field when inserting a row.