mysql
searlas
谦卑,努力
展开
-
centos yum安装mysql出现Public key for mysql-community-server-5.7.37-1.el7.x86_64.rpm is not installed
使用yum -y install mysql-community-server安装mysql时候提示:The GPG keys listed for the “MySQL 5.7 Community Server” repository are already installed but they are not correct for this package.Check that the correct key URLs are configured for this repository.Fai原创 2022-03-10 09:55:59 · 24852 阅读 · 18 评论 -
linux mysql配置文件my.cnf无法配置慢日志的方法
1 要配置有权限的路径:比如在tmp目录。(配置文件内的修改slow_query_log_file如果没有权限,不会报错,没有任何效果)直接在mysql中登录后输入:set global slow_query_log_file='XXX'提示Variable 'slow_query_log_file' can't be set to the value of '/home/log/slow_query_log.log'把路径改成 tmp/slow.log试试:成功之后查询show va.原创 2021-02-05 14:10:47 · 514 阅读 · 0 评论 -
mysql 查询优化--(分组,函数的应用)例子查找学生-课程成绩低于课程平均分的学生信息
之前上课感觉group by 和 一张表变成两张表使用(类似 from user_class as uc1,user_class as uc2)没怎么学好,特此实验一番user 表(用户即学生) class表 课程表 user_class表 用户选课表 查询目的 课程成绩低于课程平均分的学生信息。第一次尝试,实现简单效果mysql> select uc.* fr...原创 2018-08-23 11:44:51 · 9462 阅读 · 0 评论 -
mysql 5.7.23默认编码设置 安装目录my.ini无效
首先用的是官网的安装版向导里面没有设置编码的。mysql-installer-community-5.7.23.0.msi网上一堆设置默认编码都是在安装目录下的,到了Stack Overflow也没有发现。最后成功的方案:在系统盘ProgramData(默认隐藏)文件夹里面的mysql里面的my.ini修改编码成功修改内容[mysql]default-character-set=...原创 2018-10-17 13:57:07 · 1609 阅读 · 4 评论