in Set (0.00 sec)Mysql> SELECT @ @session. sql_mode\g;1. Row ***************************@ @session. sql_mode:no_unsigned_subtraction1 row in Set (0.00 sec)You can see that the current global Sql_mode setting is empty, and the current session is set to No_unsigned_subtraction. You can set the current Sql_mode to strict mode by using the following statement.mysql> SET GLOBAL sql_mode= ' strict_trans_tables '
:60 queries per second avg:0.053--------------Mysql>Create a test table for Scott users in the Oracle database:mysql> use MySQLReading table information for completion of table and column namesCan turn off this feature to get a quicker startup with-aDatabase changedMysql> Show Database;Error 1064 (42000): You have a error in your SQL syntax; Check the manual-corresponds to your MySQL server version for the right syntax-use near ' database ' at line 1mysql> show databases;+--------------------+|
13.4 MySQL User managementMySQL Create user and authorizegrant all on *.* to ‘user1‘ identified by ‘passwd‘;grant SELECT,UPDATE,INSERT on db1.* to ‘user2‘@‘192.168.133.1‘ identified by ‘passwd‘;grant all on db1.* to ‘user3‘@‘%‘ identified by ‘passwd‘;show grants;show grants for [emailprotected];Grant will not be logged in the command history, not secure.Operation ProcessMysql> Grant All on * * to ' user1 ' @ ' 127.0.0.1 ' identified by ' 123456a '; Query OK, 0 rows Affected (0.00
_ bin (binary) ends.
2. different character sets and validation rules can control case sensitivity.
MySQL5.1 uses different character sets or verification rules in the same server, database, or even table to mix and define strings. Character set and verification rules have four default settings: Server-level, database-level, table-level, and connection-level.
2.1 Server level
MySQL determines the server character set and server verification rules as follows:
(1) modify the configuration file/e
processo The total amount of virtual memory used by the VIRT process, in kilobytes. Virt=swap+resThe P swap process uses the size of the virtual memory, which is swapped out, in kilobytes.The size of the physical memory, in kilobytes, that the Q RES process uses and has not been swapped out. Res=code+dataR code executable code occupies the physical memory size, in kilobytesThe amount of physical memory that is used outside of the S data executable code (data segment + stack), in kilobytesT SHR
.
availiable bytes (memory): Number of physical memory. If the value of the available MBytes is small (4 MB or less), the total memory may be insufficient on the computer or the program is not releasing memory.
Context Switch/sec (System): (Instantiating Inetinfo and dllhost processes) if you decide to increase the size of the thread byte pool, you should monitor the three counters (including one above). Increasing the number of threads may increase t
input statement.Mysql> Show variables like "event_%"; --Check if the scheduler is enabled+-----------------+-------+| variable_name | Value |+-----------------+-------+| Event_scheduler | On |+-----------------+-------+1 row in Set (0.00 sec)Mysql>? Create event; --View the syntax for creating eventsName: ' CREATE EVENT 'Description:Syntax:CREATE[definer = {User | Current_User}]EVENT[IF not EXISTS]Event_NameOn SCHEDULE SCHEDULE[on completion [NOT] PR
***************************
@@ Global.sql_mode:
1 row in Set (0.00 sec)
mysql> SELECT @ @session. sql_mode\g;
1. Row ***************************
@ @session. sql_mode:no_unsigned_subtraction
1 row in Set (0.00 sec)
You can see that the current global Sql_mode setting is empty, and the current session is set to No_unsigned_subtraction. You can set the current Sql_mode to
|+---------------------------+24 rows in Set (0.00 sec)Well, we've learned some simple database operations, and then we're going to start creating our own databases, datasheets!Create a databaseSimple command:Create Database MyData;The result is:Query OK, 1 row Affected (0.00 sec)The prompt has been successful. Next we use the View Table command, show:Mysql> Show databases;+-----------
I just took the time to perform master-master synchronization for MySQL.
Write down the steps and update them at any time for any problems. Here, the database I synchronized is test.
1. Environment Description.
HOST: 192.168.0.231 ()
HOST: 192.168.0.20.( B)
MySQL version 5.1.21
2. Authorize the user.
A:
Mysql> grant replication slave, file on *. * To 'repl1' @ '192. 168.0.20.' identified
By '123 ';
Query OK, 0 rows affected (0.00 Sec)
Mysql> flush pr
5.6, we found that the alter column step is the same as the modify column step.
Mysql>Create Table Xs (name varchar (12), age int default 5 );Query OK, 0 rows affected (0.34 Sec)
Mysql>Insert into Xs values ('A', 4 );Query OK, 1 row affected (0.05 Sec)
Mysql>Set profiling = 1;Query OK, 0 rows affected, 1 warning (0.01 Sec)
Mysql>Alter table Xs modify age int not
/plainContent-Length: 12Connection: keep-aliveDate: Sun, 15 Dec 2013 15:00:15 GMTServer: gophr
$ Curl-sI http://go.fcgi.unix/| wc-c141
Start the engine
Use sysctl to configure the kernel
Configure Nginx
Configure Nginx vhosts
Start the service with www-data
Run the Benchmark Test
Benchmark Test GOMAXPROCS = 1Go standalone
# Wrk-t100-c5000-d30s http: // 127.0.0.1: 8080/Running 30 s test @ http: // 127.0.0.1: 8080/100 threads and 5000 connectionsThread Stats Avg Stdev Max ++/-StdevLatency 11
Counter is a data indicator that describes the performance of servers or operating systems. Counters play a key role in performance testing, especially when analyzing the scalability of the system and locating performance bottlenecks, the Analysis of counter values is critical. However, it must be noted that a single performance counter can only reflect one aspect of the system performance, and the analysis of the performance test results must be based on multiple different counters.
Another ter
encoded, MySQL's character-set-client is configured as GBK, and the table structure is charset = utf8, there will be no doubt there will be garbled characters.
Here we will give a simple demonstration of this situation:
Master [localhost] {msandbox} (test)> create table charset_test_utf8 (id int primary key auto_increment, char_col varchar (50) charset = utf8; Query OK, 0 rows affected (0.04 sec) master [localhost] {msandbox} (test)> set names gbk
Mysqlusetest1; ReadingtableinformationforcompletionoftableandcolumnnamesYoucanturnoffthisfeaturetogetaquickerstartupwith-ADatabasechangemysql
mysql> use test1;Reading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with -ADatabase changemysql> select * from emp;+------------+----------+------+--------+| ename | hiredate | sal | deptno |+------------+----------+------+--------+| aaaaa | NULL | NULL | 1 || ccccccc
MASTER-MASTER cyclic synchronization from the MASTER node of MYSQL to the MASTER node.
However, being prepared will have a certain impact on performance!
Write down the steps and update them at any time for any problems. Here, the database I synchronized is TEST.
1. environment description.
Host: 192.168.0.231 ()
Host: 192.168.0.20.( B)
MYSQL version 5.1.21
2. authorize the user.
A:
Mysql> grant replication slave, file on *. * to 'repl1' @ '192. 168.0.20.' identified
By '123 ';
Query OK, 0 rows
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.