Server System Variables
The server maintains a number of system variables that represent its configuration. All variables have default values. You can set them on the command line or option file Setup options when the server starts. Most can be set
Cross-database server, cross-instance access is a more common way of access, in Oracle can be achieved through the way of DB link. For MySQL, there is a federated storage engine that corresponds to it. It is also a way to access data on a remote
Use a
Copy Code code as follows:
SELECT ' Keyword_rank '. * from ' Keyword_rank ' WHERE (advertiserid= ' a ') LIMIT 2 OFFSET 1;
For example, the SQL, followed by the limit is 2 data, offset is from the 1th read from the
MySQL in the can ' t specify target table for update in the FROM clause error means that you cannot select some of the values in the same table first, and then update the table (in the same statement). For example, the following SQL:
Copy Code
After the MySQL installation is successful, there are several default configuration templates, which are listed below:MY-HUGE.CNF: for high-end products server, including 1 to 2GB RAM, mainly running MySQLMy-innodb-heavy-4g.ini: for installation
This article is about using MySQL source to install MySQL and configure multiple instances with Mysqld_multi.
1, download the MySQL source installation version
To MySQL website to find the appropriate version of the download, this article is
Query for SQL statements that all databases consume disk space size:
Copy Code code as follows:
Select Table_schema, concat (Truncate (SUM (data_length)/1024/1024,2), ' MB ') as Data_size,Concat (Truncate (SUM (index_length)/1024/10
1. Enter mysqld
If you have set the MYSQL/BIN environment variable, enter the command directly in CMD, if you do not set the MySQL environment variable, go to the MySQL installation directory bin folder run
F:\AppServ\MySQL\bin\mysql.exe-u root-p
Using the Date_format methodSELECT * from ' Ler_items ' WHERE date_format (posttime, '%y-%m ') = ' 2013-03 '
Note: The date must be used ', otherwise no effect
Some other about MySQL date lookup statements
Mysql> Select Date_format (Date_sub
The MySQL operation also has the cyclic statement operation, the network says has 3 standard cycle way: While loop, loop loop and repeat loop. There is also a nonstandard cycle: goto. In view of the jump of the goto statement will cause the use of
Front-end time, roommate brought together a question about MySQL queries:
There are 3 sheets:
1,zd_product Product Table zp_id PRIMARY key (Product ID) inputtime (product release time)
2,zd_order order Form zp_id foreign key (product ID) zo_id
One of the problems that you encounter when you deploy your program, the MySQL definition is as follows:
Copy Code code as follows:
CREATE TABLE ' Example ' (
' ID ' INTEGER UNSIGNED not NULL auto_increment,
' Created ' TIMESTAMP
First, create pinyin comparison table
Copy Code code as follows:
--Create a Chinese phonetic control temporary table
CREATE TABLE IF not EXISTS ' T_base_pinyin ' (
' Pin_yin_ ' varchar (255) CHARACTER SET GBK not NULL,
' Code_
Recently installed a MySQL 5.0 on Ubuntu, because the use of phpMyAdmin must also install PHP, so I intend to use the Remote administration tool navicat for MySQL to connect directly.
Create a data table with the MySQL command line in Ubuntu and
Write a test of MySQL PHP file is as follows:
Copy Code code as follows:
$link =mysql_connect (' localhost ', ' root ', ' root ');
if (! $link) echo "Failed!";
else echo "Success!";
Mysql_close ();
?>
Results reported
After looking at phpinfo () did not find the MySQL module, after the so-called solution such as "will php.ini" into the C:\Windows environment variables such as not reliable saying ...
Even copy ext folder dll to System32 medium
I didn't see the
PHP page UTF-8 encoding problem
1. Add a line to the beginning of the code:
Copy Code code as follows:
Header ("Content-type:text/html;charset=utf-8");
2.PHP file Encoding Problem
Click on the Editor's menu: "File"-> "Save As"
When we use the traditional mysql_connect, mysql_query method to connect query database, if the filter is not strict, there is SQL injection risk, resulting in the site was attacked, out of control. Although you can use the mysql_real_escape_string (
Mysql implicit type conversion principle and mysql implicit Principle
MySQL implicit type conversion principle:
-If either of the two parameters is NULL, the comparison result is NULL. The exception is that when two NULL values are compared, 1 is
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