indicates the month (1, 2,..., 12)The year in the format of % Y.The year in double-digit % y format.% Direct value "%"
(6 ):datediff(date1,date2)Calculate the number of days for the difference between two dates
SELECT datediff('2015-8-8',now()) #654IV. Process control
(1 ):if(value,t,f)If the value is true, t is returned; otherwise, f is returned.
Mysql> SELECT if (salary> 1500, 'high', 'Low') FROM salary; + ------------------------- + | if (salary>
4.4 as an example:
Vi/usr/local/MySQL/bin/mysqld_safe
Find safe_MySQLd and edit it. find the two lines started by mysqld and add the following parameters:
-O max_connections = 1500
The specific point is the following position:
Note in red:
Then $ NOHUP_NICENESS $ ledir/$ MySQLD
$ Defaults -- basedir = $ MY_BASEDIR_VERSION
-- Datadir = $ DATADIR $ USER_OPTION
-- Pid-file = $ pid_file
-- Skip-external-locking
-O max_connections =
How to modify the default connections of MySQL5.0 in Linux bitsCN.com during this time, the server crashed twice and no reason was found. today, I saw an error message email from the forum, I think of the problem that may be caused by the default number of connections in mysql. check it out. my god, the default number of connections is only 100. how can this problem be solved? I found some information on the Internet for a long time and said I had to modify my. for cnf, it is said to modify safe
. find the two lines started by mysqld and add the following parameters:
-O max_connections = 1500
The specific point is the following position:
Note in red:
Then $ NOHUP_NICENESS $ ledir/$ MYSQLD
$ Defaults -- basedir = $ MY_BASEDIR_VERSION
-- Datadir = $ DATADIR $ USER_OPTION
-- Pid-file = $ pid_file
-- Skip-external-locking
-O max_connections = 1500
>>$ Err_log 2> 1 else
Eval "$ NOHUP_NICENESS $ ledir/$
network stop // stop a network service
Service network restart // restart the network service
Service network status // view the network service status
Ifconfig eth0 192.168.10.222 netmask 255.255.255.0 // temporarily modify the interface IP address (no need to restart the interface)
[Yeger @ yeger ~] $ Sudo ifconfig wlan0 192.168.21.199 netmask 255.255.255.0
[Yeger @ yeger ~] $ Ifconfig wlan0
Wlan0 Link encap: Ethernet HWaddr 00: 02: 72: 77: BB: D1
Inet addr: 192.168.21.199 Bcast: 192.168.21
fails, it is transferred to another line.
Mode = 0 indicates the server load balancer mode. both NICs work and must be supported by the switch.
Mode = 1 indicates the redundancy mode. only one network adapter works. if one problem occurs, another one is enabled.
Mode = 6 indicates the server load balancer mode. both NICs work and do not require support from vswitches.
Here I am binding four NICs, and the server is dell R720. the default Nic name is em1 -- em4. when the NIC is bound, the config
All devices in CentOS are files. the NIC is also defined in the file. to bind an IP address, you only need to change the file. nic files are located in the directory:/etc/sysconfig/network-scripts to query the current IP information: ifconfig: eth0Linkencap: all devices in Etherne CentOS are files. the NIC is also defined in the file. to bind an IP address, you only need to change the file. nic files are in the directory:
/Etc/sysconfig/network-scripts: ifconfig: eth0
Link encap: Ethernet
HWad
{speed}== "1000"attr{duplex}== "Full"attr{dormant}== "0"attr{operstate}== "Up"attr{mtu}== "1500"attr{flags}== "0x1003"attr{tx_queue_len}== "1000"..............................Refer to the above output to intercept the information that uniquely identifies the eth0 NIC and begin writing Udev rules# Vim/etc/udev/rules.d/99-nic.rulessubsystem== "NET", action== "Add", drivers== "? *", attr{address}== "00:0c:29:20:34:b9", attr{type}== "1", kernel== "eth*" ,
The TCP/IP protocol involves four layers: link layer, network layer, transmission layer, and application layer.The Ethernet data frame is at the link layer.IP packageAt the network layerTCP or UDP packetsAt the transport layerData in TCP or UDP(Data) at the application layerTheirLink isData frame {IP packet {TCP or UDP packet {Data }}}---------------------------------------------------------------------------------The maximum length of Data used in applications depends on the underlying limits.L
vlan 1 name default type ethernet mtu 1500 said 100001 state active
Set vlan 100 name VLAN0100 type ethernet pvlantype primary mtu 1500 said 100100 state active
Set vlan 101 name VLAN0101 type ethernet pvlantype isolated mtu 1500 said 100101 state active
Set vlan 102 name VLAN0102 type ethernet pvlantype community mtu
the number of active processes when the server load is reduced.
Note: in the above parameters that relate to the number of statistics requests, only the first request is counted for keepalive connections.Next, let's look at mpm_perfork mpm_worker the default configuration under modules and modules:#mpm_perfork模块 #推荐设置: small = default =20~50 large =50~100minspareservers #推荐设置: Consistent with startservers maxspareservers #推荐设置: Small =20 =30~80 la
-MAY-81 2850 30
7782 clark manager 7839 09-JUN-81 2450 10
7788 scott analyst 7566 09-DEC-82 3000 20
7839 king president 17-NOV-81 5000 10
7844 turner salesman 7698 08-SEP-81 1500 0 30
7876 adams clerk 7788 12-JAN-83 1100 20
7900 james clerk 7698 03-DEC-81 950 30
7902 ford analyst 7566 03-DEC-81 3000 20
7934 miller clerk 7782 23-JAN-82 1300 10
This article takes the preceding EMP table as an example to discuss the features of null values in daily appl
-utilsInstalled it is time-to-look for the current network configuration. The easiest-to-do-is-to-run the ifconfig command. The following shows output from running ifconfig in a system on which KVM are installed, but on which a network bridge have Yet to be configured:Eth0 Link encap:ethernet HWaddr 00:13:72:0b:14:57inet addr:192.168.2.18 bcast:255.255.255.255 mask:255.255.255.0Inet6 ADDR:FE80::213:72FF:FE0B:1457/64 Scope:linkUp broadcast RUNNING multicast mtu:
All the devices in the CentOS are files. The NIC is also defined in the file.
The binding of IP also requires only changes to the file.
Network card related files in directory:/etc/sysconfig/network-scripts
Querying Current IP information:
Ifconfig
Eth0 Link encap:ethernet hwaddr 00:50:56:ac:6b:0f
inet addr:42.51.135.206 bcast:42.51.135.255 mask:255.255.255.0
Inet6 ADDR:FE80::250:56FF:FEAD:6B0F/64 Scope:link
Up broadcast RUNNING multicast mtu:1500
-O max_connections=1500
The specific point is the following location:
Use Description:
The code is as follows
Copy Code
Then $NOHUP _niceness $ledir/$MySQLD$defaults--basedir= $MY _basedir_version--datadir= $DATADIR $USER _option--pid-file= $pid _file--skip-external-locking-O max_connections=1500>> $err _log 2>1 ElseEval "$NOHUP _niceness $ledir/$MySQLD$de
KVM and virt management software~ sudo apt-get install KVM QEMU~ sudo apt-get install virtinst python-libvirt virt-viewer Virt-managerIt's really easy to install on Ubuntu.
3. Configure the bridge adapter
1) Here we use the NIC bridging method~ sudo apt-get Install bridge-utils
2) View the settings for the network card ~ ifconfig eth0 Link encap:ethernet HWaddr 00:1c:25:a1:99:fc inet addr : 192.168.1.10 bcast:192.168.1.255 mask:255.255.255.0 Inet6 addr:fe80::21c:25ff:fea1:99fc/64 scope:
max_connections=1500
The specific point is the following location:
In the Red Word special Description:
Then $NOHUP _niceness $ledir/$MYSQLD
$defaults--basedir= $MY _basedir_version
--datadir= $DATADIR $USER _option
--pid-file= $pid _file
--skip-external-locking
-O max_connections=1500
>> $err _log 2>1 Else
Eval "$NOHUP _niceness $ledir/$MYSQLD
$defaults--basedir= $MY _basedir_version
--datadir
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.