当前位置:网站首页>Centos7 MySQL records
Centos7 MySQL records
2022-06-23 06:51:00 【Small code 2016】
install
# To add community resources rpm package
rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
# install
yum -y install mysql-community-server
The configuration file
Location :/etc/my.cnf
[client]
port=3306
password=root
default-character-set=utf8
[mysqld]
port=3306
character-set-server=utf8
character-set-client=utf8
init_connect='SET NAMES utf8'
# Case insensitive
lower_case_table_names=1
# Maximum number of links
max_connection=1000
# Slow query log
#slow_query_log=1
#slow_query_log_file=/var/lib/mysql/km-base-slow.log
#long_query_time=2
#log_queries_not_using_indexes=0
# After starting the slow query , Do not add the following configuration , Error creating function
#log_bin_trust_function_creators=1
#
# 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
#
# 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
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Recommended in standard MySQL setup
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[mysql]
# Automatic prompt , The default is not on
no-auto-rehash
#auto-rehash
default-character-set=utf8
Reset password
use mysql;
UPDATE user SET password=PASSWORD("root") WHERE user='root';
FLUSH PRIVILEGES;
quit;
The remote access
use mysql;
grant all privileges on *.* to 'root'@'%' identified by 'root';
flush privileges;
Boot up
# start-up
systemctl start mysql
# Boot up
systemctl enable mysql
边栏推荐
- 利用adb 调试设备串口信息的一个小方法
- Problem: when the attribute in the data object (defined data) in the access component is also the attribute in the object object, an error is reported
- 【Qt】基础学习笔记
- 746. 使用最小花费爬楼梯-动态规划
- Test of ers function under the supplier consignment purchase mode of SAP mm
- Haas506 2.0 development tutorial - Advanced Component Library -modem Net (only supports versions above 2.2)
- How to maintain secure encryption of email communication with FDA?
- Topic35——34. Find the first and last positions of elements in a sorted array
- C Advanced Learning -- Reflection
- system 权限程序不能访问sd卡问题
猜你喜欢

20220621 Dual Quaternion

Copy and paste of idea without escape

Badly placed ()‘s 问题

Easy EDA learning notes 09 esp32-wroom-32e module esp32-devkitc-v4 development board one click download circuit

How to view native IP

cmder

How to maintain secure encryption of email communication with FDA?

Linux安装mysql8.0.25

Common setup modes (Abstract Factory & responsibility chain mode & observer mode)

haas506 2.0开发教程-高级组件库-modem.sms(仅支持2.2以上版本)
随机推荐
Test of ers function under the supplier consignment purchase mode of SAP mm
MySQL ON DUPLICATE KEY 和 PgSQL ON CONFLICT(主键) 处理主键冲突
Phpstudy set 301 redirection
Usage Summary of item views and item widgets controls in QT
idea自动生成serialVersionUID
快速认识 WebAssembly
phpStudy设置301重定向
Data indicators and data analysis models that designers need to understand
C语言学习总结
C# DPI适配问题
Miscellaneous things
Open source ecology 𞓜 super practical open source license basic knowledge literacy post (Part 2)
总结的好处
问题:访问组件中数据object(定义的数据)中属性也为object对象中的属性时,报错现象
ssm + ftp +ueditor
【系统】右键桌面图标,转圈后,资源管理器就崩溃,桌面就重新刷新
Laravel log channel grouping configuration
leetcode - 572. 另一棵树的子树
Numerical calculation method chapter7 Calculating eigenvalues and eigenvectors of matrices
20220621 Dual Quaternion