Home > Database > Mysql Tutorial > [mysql]创建数据库并制定编码_MySQL

[mysql]创建数据库并制定编码_MySQL

WBOY
Release: 2016-06-01 13:01:43
Original
949 people have browsed it

现在用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 &#39;password&#39;;
FLUSH PRIVILEGES;</code>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template