Difference between #13 and #14 of
Yii v2 snippet guide

Revision #14 has been created by rackycz on Sep 19, 2019, 9:00:55 PM with the memo:

db
« previous (#13) next (#15) »

Changes

Title unchanged

Yii v2 for beginners

Category unchanged

Tutorials

Yii version unchanged

2.0

Tags unchanged

tutorial,beginner,yii2

Content changed

[...]
---
To create DB with users, use following command. I recommend charset **utf8_unicode_ci** (or utf8mb4_unicode_ci) as it allows you to use [more international characters](https://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci).

```MySQL
CREATE DATABASE IF NOT EXISTS `yii-demo-db` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
```
 
 
If you must use MyISAM instead of InnoDB, just skip the last row.
 
 
```MySQL

CREATE TABLE IF NOT EXISTS `user` (
`id` INT NOT NULL AUTO_INCREMENT,
[...]
PRIMARY KEY (`id`))
ENGINE = InnoDB;
```
 
 
Adding first user:
 
 
```MySQL
INSERT INTO `user` (`id`, `username`, `password`) VALUES (NULL, 'user01', '0497fe4d674fe37194a6fcb08913e596ef6a307f'); ``` If you must use MyISAM instead of InnoDB, just change the word InnoDB into MYISAM.
 
 
Login via database + Session
---
... text ...

Access rights
---
[...]
2 0
1 follower
Viewed: 11 912 times
Version: 2.0
Category: Tutorials
Written by: rackycz
Last updated by: rackycz
Created on: Sep 19, 2019
Last updated: a month ago
Update Article

Revisions

View all history