Linux下MySQL数据库的my.cnf配置文件,解决中文乱码问题
系统 CentOS 7.7
MySQL - 5.7.28
文件放置目录:/etc/
文件权限:644
解决问题:存储中文数据乱码
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL. [client]
default-character-set=utf8 [mysql]
#auto-rehash
default-character-set = utf8 [mysqld]
character_set_server=utf8
init_connect='SET NAMES utf8' # Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M # Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin # These are commonly set, remove the # and set as required.
# basedir = .....
# datadir = .....
# port = .....
# server_id = .....
# socket = ..... # Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
Linux下MySQL数据库的my.cnf配置文件,解决中文乱码问题的更多相关文章
- Linux下修改MySQL数据库字符编码为UTF-8解决中文乱码
由于MySQL编码原因会导致数据库出现乱码. 解决办法: 修改MySQL数据库字符编码为UTF-8,UTF-8包含全世界所有国家需要用到的字符,是国际编码. 具体操作: 1.进入MySQL控制台 &g ...
- linux下mysql数据库的操作
本文主要针对linux下mysql数据库的安装,以及数据库的创建和简单的数据库操作进行说明. ①.Mysql数据库的安装: 数据库的安装分为源码安装和rpm安装. 当然对于老手来说需要进行一些自定义的 ...
- Linux下MySQL数据库主从同步配置
说明: 操作系统:CentOS 5.x 64位 MySQL数据库版本:mysql-5.5.35 MySQL主服务器:192.168.21.128 MySQL从服务器:192.168.21.129 准备 ...
- Linux下MySQL数据库的备份与恢复
Linux下MySQL数据库的备份与恢复 作者:Grey 原文地址: Github 语雀 博客园 基于版本 MySQL5.7 Deepin Linux 15.11 xtrabackup-2.4.18 ...
- 记录--linux下mysql数据库问题
本次主要记录一下linux下mysql数据库的一些问题,也是之前经常用到的知识,这里简单总结一些问题,方便自己以后的回顾.原来一直使用的是阿里云的RDS数据库mysql版,主要是因为上次阿里云做活动可 ...
- Linux 下,mysql数据库报无法登陆错误:ERROR 1045 (28000): Access denied for use
今天在别人的服务器上登录mysql发现无法登陆(Mysql别人实现安装好的) 密码和用户名都是正确的,但登录后报如下错误: ERROR 1045 (28000): Access denied for ...
- Linux下Mysql数据库备份
今天一同事的电脑无缘无故坏了,找了IT部门检测说是硬盘坏了,数据无法恢复.好悲剧.自己博客也写了好久不容易,要是突然间数据丢了那怎么办!于是写了个数据库自动备份脚本,并创建任务计划,实现每天22:30 ...
- Linux下MySQL 数据库的基本操作
1. 创建数据库相关命令: 首先,下载MySQL相关软件包:aptitude install mysql-server/mysql-client MySQL中的root用户类似于Linux下的root ...
- linux下mysql5.7以上my.cnf配置文件配置
简单配置,低配置服务器配置 [client] #客户端设置 port = 3306 socket = /data/mysql/data/mysql.sock default-character-set ...
随机推荐
- 【Eureka】集群搭建
[Eureka]集群搭建 转载============================================== ====================================== ...
- ThinkPhp RBAC实现原理
RBAC是英文Role-Based Access Control的缩写,是基于角色访问进行控制的机制.意思是给每个用户设定一个角色,然后根据这个角色来判断用户的权限. 在此基于ThinkPhp的MVC ...
- 《Java Spring框架》基于IDEA搭建Spring源码
第一步: IDEA :IntelliJ IDEA 2018.1.4 :JDK安装(必须1.8或者以上),IDEA安装(过程省略). 第二步: Gradle:下载地址:https://servic ...
- [译]C# 7系列,Part 7: ref Returns ref返回结果
原文:https://blogs.msdn.microsoft.com/mazhou/2017/12/12/c-7-series-part-7-ref-returns/ 背景 有两种方法可以将一个值传 ...
- netcore 创建腾讯云私有镜像 发布到docker 实战
上一篇博客写的 netcoer上传到docker ,编译 并发布,传送门:FineUICore基础版部署到docker实战 这是一种笨方法,理想的方法是,在本地编译成镜像,然后推送到镜像仓库,服务器的 ...
- JS---变速动画函数封装
变速动画函数封装 匀速动画:每次步数都是10 (var step=10;) 变速(缓动)动画:每次的步数是用当前位置和目标位置相减 var step=(target-current)/10; 代码如下 ...
- WPF布局容器
1.StackPanel:堆栈面板,通过Orientation属性设置子元素的布局排列方向为“Vertical”(垂直)和“Horizontal”(水平),不写其默认值为“Vertical”,当设置为 ...
- 错题本:ConstraintLayout 不能正常显示
理想效果: 实际效果: 原因:因为文件中一个控件的约束属性写错了 这个属性是 app:layout_constraintLeft_toLeftOf="@id/oa_setting_group ...
- 计划任务cron
cron 计划任务 作用: 计划任务主要是做一些周期性的任务,目前最主要的用途是定期备份数据 Schedule one-time tasks with at. 一次性调度执行 atSchedule r ...
- 报错解决 unable to unroll loop, loop does not appear to terminate in a timely manner (994 iterations) or unrolled loop is too large, use the [unroll(n)] attribute to force an exact higher number
在 Unity 写 Shader 的时候,在一个循环里面使用了 tex2D 函数,类似与下面这样: fixed2 center = fixed2(0.5,0.5); fixed2 uv = i.uv ...