mysql ip配置文件_MYSQL 、/etc/my.cnf 配置文件

MYSQL 、/etc/my.cnf

7配置参数 # bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/data/mysql --defaults-file=/etc/my.cnfhtml

bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/data/mysql

alter user 'root'@'localhost' identified by 'Szyq1234';

update mysql.user set host="%" where user="root";

select user,host from mysql.user where='root';

flush privileges;

mysqld --defaults-file=/etc/my.cnf --user=rootmysql

alter user 'root'@'%' identified with mysql_native_password by 'Szyq1234';sql

For advice on how to change settings please see

* 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.

[mysqld]数据库

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 = /usr/local/mysql

datadir = /data/mysql

port = 3307markdown

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 = 2Msocket

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

~ ######################################################ide

[client]

port = 3306

socket = /tmp/mysql.sock性能

[mysqld]ui

Mysql服务的惟一编号 每一个mysql服务Id需惟一

server-id = 1

服务端口号 默认3306

port = 3306

mysql安装根目录

basedir = /opt/mysql

mysql数据文件所在位置

datadir = /opt/mysql/data

临时目录 好比load data infile会用到

tmpdir = /tmp

设置socke文件所在目录

socket = /tmp/mysql.sock

主要用于MyISAM存储引擎,若是多台服务器链接一个数据库则建议注释下面内容

skip-external-locking

只能用IP地址检查客户端的登陆,不用主机名

skip_name_resolve = 1

事务隔离级别,默认为可重复读,mysql默承认重复读级别(此级别下可能参数不少间隙锁,影响性能)

transaction_isolation = READ-COMMITTED

数据库默认字符集,主流字符集支持一些特殊表情符号(特殊表情符占用4个字节)

character-set-server = utf8mb4

数据库字

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值