cp data file cp /var/lib/mysql /data -Rf chown -R mysql:mysql /data/mysql AppArmor /etc/apparmor.d/local/usr.sbin.mysqld
/data/mysql r, /data/mysql/** rwk, sudo systemctl reload apparmor sudo as myql sudo -s -u mysql mysql 时间类型支持微秒 MySQL permits fractional seconds for TIME, DATETIME, and TIMESTAMP values, with up to microseconds (6 digits) Mysql DATETIME(6) DATETIME[(fsp)] The fsp value, if given, must be in the range 0 to 6. A value of 0 signifies that there is no fractional part.
What is anycast? Anycast, also known as IP anycast, is a networking technique that allows for multiple machines to share the same IP address. Based on the location of the user request, the routers send it to the machine in the network that is closest. This is beneficial since, among other things, it reduces latency and increases redundancy. If a particular data center were to go offline, an anycasted IP would choose the best path for users and automatically redirect them to the next closest data center.
TZ $ export TZ=:/etc/localtime locale /etc/environment: LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 1: set TZ=:/etc/localtime https://blog.packagecloud.io/eng/2017/02/21/set-environment-variable-save-thousands-of-system-calls/
mysql utf8 For the recent version of MySQL,
default-character-set = utf8 causes a problem. It’s deprecated I think.
As Justin Ball says in “Upgrade to MySQL 5.5.12 and now MySQL won’t start, you should:
Remove that directive and you should be good. Then your configuration file (‘/etc/my.cnf’ for example) should look like that: [mysqld] collation-server = utf8_unicode_ci init-connect=‘SET NAMES utf8’ character-set-server = utf8 Restart MySQL.
The main point of a Content Distribution Network (CDN) is to put the content as close to the end-user as possible, thereby reducing the Distance component of the Round Trip Time (RTT) and speeding up the request. Simply serving static content from a s# sub-domain for CDN.
The advantages of serving content from such a sub-domain, however, are that
The sub-domain can be a cookie-less domain
If you use your cookies correctly (ie.
1: ArangoDB automatically indexes the _key attribute in each collection. There is no need to index this attribute separately. Please note that a document’s _id attribute is derived from the _key attribute, and is thus implicitly indexed, too.
2: Creating a database
We don’t want to mess with any existing data, so let’s start by creating a new database called “mydb”:
db.createDatabase(‘mydb’).then( () => console.log(‘Database created’), err => console.error(‘Failed to create database:‘, err) );
QEMU runs the guest code via the KVM kernel module. When working with KVM, QEMU also does I/O emulation, I/O device setup, live migration, and so on. QEMU opens the device file (/dev/kvm) exposed by the KVM kernel module and executes ioctls()on it
KVM exposesa device file called /dev/kvmto applications to make use of the ioctls()provided. QEMU makes use of this device file to talk with KVM and to create, initialize, and manage the kernel mode context of virtual machines
kafka broker connected remotely by ip config/server.properties
advertised.listeners=PLAINTEXT://172.16.16.5:9092 ############################# Log Retention Policy ############################# # The following configurations control the disposal of log segments. The policy can # be set to delete segments after a period of time, or after a given size has accumulated. # A segment will be deleted whenever *either* of these criteria are met. Deletion always happens # from the end of the log. # The minimum age of a log file to be eligible for deletion due to age log.
mysqladmin status MySQL is multithreaded, so there may be many clients issuing queries for a given table simultaneously. To minimize the problem with multiple client sessions having different states on the same table, the table is opened independently by each concurrent session. This uses additional memory but normally increases performance
The table_open_cache and max_connections system variables affect the maximum number of files the server keeps open. If you increase one or both of these values, you may run up against a limit imposed by your operating system on the per-process number of open file descriptors.
Server and Operating System Kernel – vm.swappiness Disables swapping completely while 1 causes the kernel to perform the minimum amount of swapping
# Set the swappiness value as root echo 1 > /proc/sys/vm/swappiness # Alternatively, using sysctl sysctl -w vm.swappiness=1 # Verify the change cat /proc/sys/vm/swappiness 1 # Alternatively, using sysctl sysctl vm.swappiness vm.swappiness = 1 Filesystems – XFS/ext4/ZFS FILE SIZE mount option EXT4 16TB noatime,data=writeback,barrier=0,nobh,errors=remount-ro XFS 8EiB defaults,nobarrier Disk Subsystem – I/O scheduler Most modern Linux distributions come with noop or deadline I/O schedulers by default, both providing better performance than the cfq and anticipatory ones
mysql 8 测试环境快速搭建(WSL/root远程访问) sudo apt install -y mysql-server mysql --version sudo mysql mysql>CREATE USER 'root'@'%' IDENTIFIED BY '123'; mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'; mysql>flush PRIVILEGES mysql.conf.d/mysqld.cnf :32:bind-address = 0.0.0.0
sudo service mysql restart Create the root user (yes, a new user because what exists is ‘root@localhost’ which is local access only)
root用户本地登录 本地登录使用系统认证(auth_socket)
sudo mysql root用户远程登录 mysql -u root -p'123' -h 192.168.168.128 mysql> select user,host,plugin from mysql.