MySQL Replication encountered error 1236 is a little trouble ~ usually binlog problems caused by the ~ (Master or Slave binlog bad can cause this error)
Usually encountered this situation, are Slave binlog bad, on the Slave DB of the data to solve,
We know that in the SQL, you can use like this predicate (expression) for fuzzy retrieval, and support for the%,?, _ and other placeholders.
However, the function of this fuzzy search has many limitations, simply too vague.
The REGEXP keyword is
For Windows platforms, when MySQL is installed, the system defaults to generating the license tables and accounts, and you do not need to execute mysql_install_db scripts to generate accounts and appropriate permission lists as you would on UNIX
The security of the database system includes many aspects. Because in many cases, the database server allows clients to connect from the network, the security of client connections has a significant impact on MySQL database security.
Do not provide
The statement is simple
The code is as follows
$connection =mysql_connect ("localhost", "root", "password"); Connect and select a database servermysql_select_db ("Test", $connection);$query = "SELECT * from users where
This article mainly introduces the MySQL installation-free version of the configuration steps detailed, provided two users of the installation method, you can refer to the use of 1. Prepare work Download MySQL's latest version of
1. Modify My.ini:[mysql]default-character-set=utf8[mysqld]default-character-set=utf8default-storage-engine=myisam in [ MYSQLD] Next add: default-collation=utf8_bininit_connect= ' SET NAMES UTF8 '
2. In front of the PHP program that needs to do
After reloading the Windows7 64-bit, want to add MySQL to the system service,
The order is as follows:
Mysqld.exe--install, report the following error:
Install/remove of the Service denied!
Solution:
This error is caused by the fact that the
Error:[Email protected] ~]# mysql-u root-bash:mysql:command not foundCause: This is because the system will find the command under/usr/bin by default, if this command is not in this directory, of course, will not find the command, we need to do is
Logical architectureMySQL's logical architecture is divided into 3 layers,
Connection thread processing.
The core functionality of the server, query parsing, parsing, optimization, caching, and all of the inside to functions.
Share a little of my experience belowIn general, when I first started to learn SQL, I wrote this:But when the data reaches millions, it will slow down:It might take dozens of seconds.Many of the ways to optimize online are as follows:Yes, the speed
In the project with Php+mysql, you need to insert data, but the database table field is very long, if you use the regular INSERT into table (c) VALUES (' DD '), it will be a long SQL statement, and accidentally, it is wrong.So the general use of
NULL and NOT NULLmysql> CREATE TABLE tb2(-Usename VARCHAR (a) not NULL,-Age TINYINT UNSIGNED null (can be empty));Query OK, 0 rows affected (0.06 sec)Mysql> SHOW COLUMNS from TB2;+---------+---------------------+------+-----+---------+-------+|
Use school;--class table Create TABLE Class (CID TINYINT PRIMARY KEY auto_increment, caption VARCHAR); INSERT into Class ( Caption) VALUES ("Three year Two Classes"), ("Three shifts a year"), ("Three year Class"); SELECT * from class;--teacher
Error handling:1. Syntax errors2. Run-time errors3. Logic ErrorError Reporting:Fatal error E_errorWarning E_warningNote E_noticeDevelopment phase: Output all error reports at development time, enabling us to debugRun phase: Do not let the program
Although MySQL logical backup often due to lock table and other defects are criticized, in fact, in the downtime window time, if the amount of data is not too high, do a logical backup is quite simple ~Preparatory work:1. Target repository (back up
You need to manually increase the number of users who can access the database remotely.Method one, log in to MySQL locally, change the "host" entry in the "User" table in the "MySQL" Database, and replace "localhost" with "%"#mysql-U root-prootMysql>
Date Time Type① If you want to use to denote the date and time, the datetime type is generally used;② If you want to use the date type for the month and year date ;③ if you want to represent a minute or seconds, use the time type generally; ④ if
What is the difference between mysql and mysqli?Mysqli connection is a permanent connection, while MySQL is a non-permanent connection.
Mysql connection: a new process is opened every second time.
Mysqli connection: only the same process is used all
Good habits of SQL programming and good habits of SQL programming
| Reposted from: cnblog
| Original article: http://www.cnblogs.com/MR_ke/archive/2011/05/29/2062085.html
Most of us do not need to deal with databases when we develop software.
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service