
mysql
alittlecolors
give you a little color see see
展开
-
centos7 下安装 mysql5.7
https://www.cnblogs.com/zymnstlm/p/12381627.html 转载自:https://www.cnblogs.com/zymnstlm转载 2021-08-15 17:16:05 · 181 阅读 · 0 评论 -
windows mysql8.0创建用户和授权
1.创建用户 create user ‘username’@‘localhost’ identified by ‘password’; 示例:create user ‘guocheng’@‘192.168.1.24’ identified by ‘guocheng’; guocheng:第一个账号名称,第二个位密码 192.168.1.24:只能这个ip访问guocheng账号 2.授权数据库 grant all privileges on database_name.* to ‘username’@‘lo原创 2020-09-26 09:17:29 · 772 阅读 · 0 评论 -
emoji表情数据insert sql报错,修改数据库编码为utf8mb4
Caused by: java.sql.SQLException: Incorrect string value: ‘\xF0\x9F\x91\x8B\xEE\x84…’ for column ‘nickname’ at row 1 utf8 utf8mb4 二者区别https://www.cnblogs.com/beyang/p/7580814.html 1.修改mysql 配置文件 my....原创 2018-08-13 18:17:31 · 806 阅读 · 2 评论 -
MySQL5.7修改数据存放目录
MySQL5.7默认安装,修改之前,停止MySQL服务。 默认数据库目录:C:\ProgramData\MySQL\MySQL Server 5.7\Data 配置文件:C:\ProgramData\MySQL\MySQL Server 5.7\my.ini 修改步骤: 1,把“C:\ProgramData\MySQL\MySQL Server 5.7\”下的”data”目录里内容全部拷贝...原创 2018-08-08 15:04:53 · 1990 阅读 · 0 评论 -
查询某几条帖子的前几条评论;同理:查询每个新闻类别的最新几条数据
SELECT * from t_comment a where ( SELECT count(1) from t_comment b where b.theme_id=a.theme_id and b.id > a.id )<2 and a.theme_id in (1,2,3) order by a.theme_id, a.comment_date desc; 查询某几条帖子的前几条...原创 2019-10-11 18:08:31 · 431 阅读 · 0 评论