Skip to content

Commit

Permalink
Update for issue csev#28, PK warning & utf8mb4
Browse files Browse the repository at this point in the history
Tested on - 
a) Win 11 x64Pro 22H2, MySQL 5.6.34 phpMyAdmin 4.7.0
b) Ubuntu 20.04 x64 MySQL 8.0.30 phpMyAdmin 5.2.0
Remove phpMyAdmin warning, "A comma or a closing bracket was expected. (near KEY)" , for lines 3-5 and update utf8 to utf8mb4.
  • Loading branch information
srcatto authored Oct 13, 2022
1 parent 13e4476 commit eac99d1
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions code/crud/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
To get started run the following SQL commands:

CREATE DATABASE misc;
GRANT ALL ON misc.* TO 'fred'@'localhost' IDENTIFIED BY 'zap';
GRANT ALL ON misc.* TO 'fred'@'127.0.0.1' IDENTIFIED BY 'zap';
CREATE USER 'fred'@'localhost' IDENTIFIED BY 'zap';
GRANT ALL ON misc.* TO 'fred'@'localhost';
CREATE USER 'fred'@'127.0.0.1' IDENTIFIED BY 'zap';
GRANT ALL ON misc.* TO 'fred'@'127.0.0.1';

USE misc; (Or select misc in phpMyAdmin)

CREATE TABLE users (
user_id INTEGER NOT NULL
AUTO_INCREMENT KEY,
AUTO_INCREMENT,
name VARCHAR(128),
email VARCHAR(128),
password VARCHAR(128),
PRIMARY KEY(user_id),
INDEX(email)
) ENGINE=InnoDB CHARSET=utf8;


) ENGINE=InnoDB CHARSET=utf8mb4;

0 comments on commit eac99d1

Please sign in to comment.