To see more:
- mysql在小内存服务器上的优化设置
直接安装的mysql5.7默认使用innodb引擎,默认开启performance_schema,故针对innodb优化,并关闭performance_schema,即可大幅优化内存占用
其中performance_schema影响最大,在不需要的前提下,可直接设置 performance_schema=0
即可。
# vim /etc/my.cnf
[mysqld]
performance_schema=0
innodb_buffer_pool_size = 64M
-- Create a new database named xxx
create database demo_db character set utf8mb4 collate utf8mb4_unicode_ci;
- tar
# 打包压缩
$ tar -zcvf demo.tar ./demo/
$ tar zcvf demo.tar ./demo/
$ tar zcf demo.tar ./demo/
# 解压缩
$ tar xvf demo.tar
# list all disk
$ diskutil list
/dev/disk0
/dev/disk1
/dev/disk2
...
# format U-disk to FAT32
$ diskutil partitionDisk /dev/disk5 MBR FAT32 UNTITLED 0b
- 创建gist
- 获取gist ID 如:https://gist.github.com/username/12331233, ID即为 12331233.
- clone gist 最好采用git ssh方式
git clone [email protected]:12331233.git
cd 12331233