现在用orm比较多,很多mysql表啊都不用自己创建,但是数据库还是要自己创建,记录下sql, 备忘。
<code class="language-sql hljs ">CREATE DATABASE `mydb` CHARACTER SET utf8 COLLATE utf8_general_ci; GRANT ALL ON `mydb`.* TO `username`@localhost IDENTIFIED BY 'password'; FLUSH PRIVILEGES;</code>