adonisJS mysql

 

npm i mysql --save

创建迁移(migration)
adonis make:migration students
创建好了之后执行
adonis migration:status
执行迁移,创建表格
adonis migration:run

--------------------------------------------------------------------------------------------------
adonis make:controller student

adonis make:model student

 

--------------------------------------------------------------------------------------------------
ALTER USER 'root'@'localhost' IDENTIFIED BY '123456' PASSWORD EXPIRE NEVER;
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';
FLUSH PRIVILEGES;

select user,host,plugin from user where user='root'

posted on 2022-03-06 22:21  biind  阅读(39)  评论(0编辑  收藏  举报