创建数据库并指定使用UTF-8编码
CREATE DATABASE `mydb` CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER 'username'@'host' IDENTIFIED BY 'password';
GRANT privileges ON databasename.tablename TO 'username'@'host';
FLUSH PRIVILEGES;
CREATE DATABASE `mydb` CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER 'username'@'host' IDENTIFIED BY 'password';
GRANT privileges ON databasename.tablename TO 'username'@'host';
FLUSH PRIVILEGES;
本文标题:常用数据库操作
本文链接:https://www.haomeiwen.com/subject/hjfbrqtx.html
网友评论