ubuntu mysql的配置文件找不到

Commencel 2016-06-12 11:13:33
可能也不是找不到 有下面的这个配置文件

/etc/mysq/my.cnf

内容是这样的。我如何找到啊。
我想改类似编码之类的如何改。。。求助。
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

#
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
#

!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/


进入上述的两个目录拳打开也没有类似网上找的的配置文件类似的文档
这个是Ubuntu16。04 直接在软件源上安装的
...全文
897 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
Naturespeaker 2016-09-13
  • 打赏
  • 举报
回复
1. sudo gedit /etc/mysql/mysql.conf.d/mysqld.cnf 2.在[mysqld]在下方添加以下代码 [mysqld] init_connect='SET collation_connection = utf8_unicode_ci' init_connect='SET NAMES utf8' character-set-server=utf8 collation-server=utf8_unicode_ci skip-character-set-client-handshake 3.重启mysql服务 sudo service mysql restart 4.检测字符集是否更新成utf8. 进入mysql,mysql -u root -p,输入show variables like '%character%' 查看字符集 +--------------------------+----------------------------+ | Variable_name | Value | +--------------------------+----------------------------+ | character_set_client | utf8 | | character_set_connection | utf8 | | character_set_database | utf8 | | character_set_filesystem | binary | | character_set_results | utf8 | | character_set_server | utf8 | | character_set_system | utf8 | | character_sets_dir | /usr/share/mysql/charsets/ | +--------------------------+----------------------------+
rucypli 2016-06-13
  • 打赏
  • 举报
回复
/etc/my.cnf
zhu19774279 2016-06-13
  • 打赏
  • 举报
回复
MySQL如果是5.5,那么/usr/share/mysql/下面会有my-small.cnf、my-medium.cnf、my-large.cnf、my-huge.cnf、my-innodb-heavy-4G.cnf几个文件,改名成my.cnf,放到/etc下面 如果是5.7,我记得装好以后会有my.cnf,你搜索一下,然后放到/etc下面

57,062

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧