[Arrangement] MySQL autocommit bitsCN.com
[Arrangement] MySQL autocommit
By default, mysql enables auto commit. You can run the following command to view the settings at the session level and global level:
01mysql> select @@session.autocommit;02+----------------------+03| @@session.autocommit |04+----------------------+05| 1 |06+----------------------+071 row in set (0.00 sec)0809mysql> select @@global.autocommit; 10+-------
============================================ ==================================== installing: sysstat i386 7.0.2-11.el5 base 182 k Transaction summary =============================================================================== = install 1 package (s) upgrade 0 Package (s) Total download size:182 k was this ok [y/n]: y downloading packages: sysstat-7.0.2-11.el5.i386.rpm | 182 kb 00:01 Running rpm_check_debug Running Transaction test finished Transaction test Transaction
tablespace;mysql> SET foreign_key_checks = 1;The following demonstration is slightly more complex, primarily to restore the entire scene, and to do a test for the 2,4 in the above steps.First, create the test dataCreate two tables here. Two identical tables are created to facilitate subsequent testing.mysql> CREATE TABLE t1 (ID int,hiredate datetime); Query OK, 0 rows affected (0.14 sec) mysql> CREATE TABLE t2 (ID int,hiredate datetime); Query OK, 0
Tag: cal. com specifies a numeric localhost character string local operationList of simple examples of functional usage
Function
Function
Usage
Example
Left ()
Returns a substring of the corresponding length from the left edge of the string
Left (str, length)
Mysql> Select Left (' VSSF ', 3); +----------------+| Left (' VSSF ', 3) |+----------------+| VSS |+----------------+1 row in Set (0.00 sec
Category:
DB database website Optimization
109 reading comments (0)
Favorites
Report
Directory (?) [+]
2. Memory bottleneck of SQL database
When memory is insufficient
Suspected Memory leakage
CPU bottleneck
Performance problems encountered
How to locate these performance problems
I. SQL database CPU bottleneck
There are many statuses of a working process of SQL Server, including running, runnable, and suspended.
You can check the system monitoring counter processor: %
[IT168 technical documentation]
IIS Global Active Flushed Entries is the cache file handle, which will be closed after the current transfer is complete. IIS Global object.
Number of Anonymous connections by Web Anonymous Users/Sec Users through Web Services.
Number of BLOB Cache refreshes after IIS Global BLOB Cache Flushes is started on the server.
Total number of successful searches in IIS Global BLOB Cache Hits BLOB Cache.
Percentage of IIS Global
)!} =\lim_{n\to\infty}{(2n+1) \cdot2n\over4\cdot (n+1) n}=1$$ Thus $R =1$.8. Find the first four terms of the Taylor series for $\tan x$ centered at zero. By ' first four terms ' I mean up to and including the $x ^3$ term.Solution: $ $f (0) =\tan x\big|_{x=0}=0$$ $ $f ' (0) =\sec^2 x\big|_{x=0}=1$$ $ $f "(0) =2\sec^2 X\cdot\tan x\big|_{x =0}=0$$ $ $f "(0) =2\cdot (2\sec
, but frequent page exchanges will reduce system performance. Reducing page switching significantly increases the system response speed. To monitor the status of insufficient memory, start with the following object counters:
Available Mbytes: number of available physical memory. If the available Mbytes value is small (4 MB or smaller), it indicates that the total memory on the computer may be insufficient, or a program does not release the memory.
Page/sec
You can use create user or grant to create a user, which is also assigned relevant permissions. Revoke is used to delete user permissions and drop user to delete accounts.
$ Mysql-u root-ppassword: mysql> Create Database test; # create database query OK, 1 row affected (0.00 Sec) mysql> show databases; # Check whether the database is successfully created + ------------------ + | database | + -------------------- + | information_schema | MySQL | test |
Http://www.rainsts.net/article.asp? Id = 988
You can use create user or grant to create a user, which is also assigned relevant permissions. Revoke is used to delete user permissions and drop user to delete accounts.
$ Mysql-u root-ppassword: mysql> Create Database test; # create database query OK, 1 row affected (0.00 Sec) mysql> show databases; # Check whether the database is successfully created + ------------------ + | database | + ---------------
[email protected] ~]# Yum list-sec securityLoaded plugins:downloadonly, Product-id, Rhnplugin, security, Subscription-managerUnit 2d170a73-df62-4821-88b9-693d5c62032c has been deletedThis system was receiving updates from the portal Classic or Red Hat satellite.Epel/updateinfo |820 KB 00:00Rhel-6-server-rpms/updateinfo |2.1 MB 00:00Rhel-x86_64-server-6/updateinfo |2.1 MB 00:00Rhel-x86_64-server-optional-6/updateinfo |1.1 MB 00:00rhsa-2014:0561 moderat
Batman protocol to MySQL. The results include the results of the TCP test and the results of the UDP test. The two data formats are as follows:TCP:
[ 4] 0.0-24.9 sec 2.22 MBytes 747 Kbits/sec[ 5] 0.0-1576.9 sec 125 MBytes 665 Kbits/sec[ 4] 0.0-33.6 sec 2.0
speech and in Nitsan's blog is incredible-over 100 M ops/sec. It is 10 times faster than JDK's concurrent queue implementation (the performance on 4-Core Intel Core i7 is about 8 M ops/sec ).
With great expectation, I changed the chained blocking queues connected to all actor into lockless SPSC queues. Unfortunately, performance tests on throughput have not significantly improved as I expected. But soon I
MySQL, use the MySQL command to restore the entire library directly. The command format is as follows:
Mysql-u user name-p[password]
The following walkthrough resumes an experiment after a full backup. To restore a single library: If the database is corrupted, delete the database school. [[emailprotected] ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
mysql> drop database school;
Query OK, 1 row affected (0.02
percentage of time that the disk is busy reading/writing activities.
Avg.Disk Queue Length
The average number of read and write requests (queued in the instance interval for the selected disk)
Current Disk Queue Length
Indicates the number of disk I/O requests that have been suspended. If this value is always higher than 2, it indicates a congestion
Avg.Disk Bytes/transfer
Average number of bytes transferred to or from disk during writ
]
MySQL initial environment settings
[1] set a password for the root user of MySQLWhen MySQL was just installed, its root user was not set a password. First, set the MySQL root password.
[Root @ sample ~] # Mysql-u root login use the root user to log on to the MySQL serverWelcome to the MySQL monitor. Commands end with; or/g.Your MySQL connection id is 2 to server version: 4.1.20Type 'help; 'or'/h' for help. type'/C' to cl
[1] Set the password for the MySQL root userWhen MySQL was just installed, its root user was not set to a password. First, set the MySQL root password.
[Root@sample ~]#Mysql-u Root ← Login to MySQL server with root userWelcome to the MySQL Monitor. Commands End With; or \g.Your MySQL Connection ID is 2 to server version:4.1.20 Type ' help, ' or ' \h ' for help. Type ' \c ' to clear the buffer. mysql>select User,host,password from Mysql.user; ← View
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.