mysql
ckm紫韵
这个作者很懒,什么都没留下…
展开
-
Centos7.6安装mysql8.0
centos7.6安装mysql8.0原创 2022-11-25 16:41:54 · 690 阅读 · 1 评论 -
Failing package is: mysql-community-client-5.7.40-1.el7.x86_64 GPG Keys
The GPG keys listed for the "MySQL 5.7 Community Server" repository are already installed but they are not correct for this package.原创 2022-10-12 10:36:46 · 3821 阅读 · 1 评论 -
mysql 查询时间不对
select now() 时间不对select sysdate()select current_dateselect current_time 时间不对方法set global time_zone = '+08:00';set time_zone = '+08:00';select variable like '%time_zone%';原创 2022-04-07 16:22:42 · 1015 阅读 · 0 评论 -
MySQL的性能优化
1.尽量把子段设置为NOT NULL.索引子段设置为NOT NULL2.定义子段长度,不要设置过大,根据子段来调整子段大小。3.使用外键4.使用索引,复合索引,索引覆盖5.sql语句的where查询条件,对字段进行表达式操作或函数操作,会导致mysql引擎放弃使用索引而进行全表查询。6.尽量避免使用or来连接条件查询数据(全表查询),使用union all 来代替例如select id from user where user name='a' or name='b'改为以下select原创 2022-03-09 23:01:19 · 746 阅读 · 0 评论 -
MySQL 1040 错误 Too many connections的解决方法
一.错误信息连接mysql出现Too many connections二.解决方案1.重启mysql服务2.修改最大连接数查看最大连接数show variable like '%max_connections%';修改最大连接数为10000set global max_connections=10000;docker容器修改mysql最大连接数先进入mysql容器,然后登录mysql,再修改最大连接数...原创 2020-11-26 15:16:18 · 1186 阅读 · 0 评论 -
windows系统报错:1045 Access denied for user 'root'@'localhost' (using password: YES)
1.问题使用Navicat连接mysql出现错误:1045 Access denied for user ‘root’@‘localhost’ (using password: YES)2.解决2.1找到mysql的安装目录下的my_default.ini文件2.2编辑mysql配置文件mysql_default.ini,在[mysql]下加port=3306以及skip-grant-...原创 2020-05-08 05:24:12 · 316 阅读 · 0 评论 -
‘mysql’不是内部或外部命令,也不是可运行的程序
1.问题在cmd输入mysql -uroot -p 报错‘mysql’不是内部或外部命令,也不是可运行的程序2.解决本人mysql安装的bin目录路径:C:\Program Files\MySQL\MySQL Server 5.6\bin配置环境变量:【计算机】-【属性】-【高级系统设置】-【环境变量】-新建PATH:C:\Program Files\MySQL\MySQL Serv...原创 2020-05-08 05:15:03 · 380 阅读 · 0 评论 -
.net+MySQL插入数据到数据库里面出现中文乱码
1.问题2.原因:连接数据库没有设置编码格式,要加Charset=utf-8; String connetStr = "server=服务器IP地址;port=3306;user=用户;password=密码;database=数据库名;Charset=utf8"; 插入数据后:...原创 2020-03-17 10:17:11 · 764 阅读 · 0 评论 -
阿里云CentOS7+NGINX1.12+php配置安装
一.在阿里云服务器开启 80,900,3306端口号。二、安装nginx(1)安装nginx:yum install nginx(2)启动nginx:systemctl start nginx常用的相关命令还有systemctl stop nginx、systemctl restart nginx、systemctl status nginx(3)确认是否安装成功浏览器输入i...原创 2019-11-20 18:55:03 · 435 阅读 · 0 评论 -
CentOS7安装MySQL(完整版)
1:MySQL官方的Yum Repository官网地址:https://dev.mysql.com/downloads或者https://repo.mysql.com/找到要下载的安装包路径,例如:https://repo.mysql.com/mysql57-community-release-el7-7.noarch.rpm2.下载并安装MySQL官方的 Yum Repository...原创 2019-11-20 14:50:37 · 2241 阅读 · 1 评论 -
Linux:-bash: mysqld_safe: command not found
问题:输入mysqld_safe --user=mysql --skip-grant-tables --skip-networking &,然后报错:-bash: mysqld_safe: command not found解决:输入mysqld --user=mysql --skip-grant-tables --skip-networking &把mysq...原创 2019-11-20 11:21:55 · 7276 阅读 · 2 评论