1 Check the MySQL configuration of the two parameters max_connections "maximum number of connections" and wait_timeout "connection idle Wait Long", if the default value, please modify:
View the value of the maximum number of connections.
MySQL's master-slave replication is at least two MySQL services, of course, MySQL services can be distributed on different servers, can also start multiple services on a single server.
(1) First to ensure that the master and slave server MySQL
MySQL enabled Skip-name-resolve mode when the warning approach, currently if your authorization is for all hosts you will not encounter the problem
When optimizing MySQL configuration, join skip-name-resolve, check boot log when restarting MySQL,
There is a small problem with Chinese characters when using length () in the database to fetch data lengths.
Check to see a webmaster is so understanding the length function
A sentence description: Get string length MySQL built-in function
Length
SQL statement
The code is as follows
Copy Code
SELECT * FROM _test a LEFT join _test B on a.id=b.id where a.level= ' and a.month= ' and b.level= ' 03 ' ;Select a.*,b.* from (SELECT * to _test where level= ' and month= ')
Reinstall Easy_install (Setuptools)1, to download Https://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg
2, to the terminal to perform sudo sh setuptools-0.6c11-py2.7.egg
3, clear the download Setuptools-0.6c11-py2.7.egg
(1) Use the ALTER TABLE statement to create an index.The syntax is as follows:
The code is as follows
Copy Code
ALTER TABLE table_name ADD index index_name (column_list);ALTER TABLE table_name add unique
Remote access, do not want to publish the root account, you can create a demo account on the MySQL database user table, allowing demo accounts to access the MySQL database in a specified library anywhere. Here are the actions:
Run on the
If you want to ensure the integrity of your data, the best thing to do is to stop the service, not write the data to the database, and then restore it all on the new db. But in this case, a lot of data may take several hours to back up and restore
Use the MySQL command to view
MySQL built-in directly to see the status can see the system common information, such as the following example:
The code is as follows
Copy Code
1.$ Mysql-u Root-p2.mysql> s"Threads:2
MySQL Tutorial Database Tutorials How to connect the mysql_connect() function
Definitions and usageThe mysql_connect () function opens a non-persistent MySQL connection.
GrammarMysql_connect (Server,user,pwd,newlink,clientflag)
Resource
If you want to add columns to the table, use the following syntax:
ALTER TABLE table_nameADD column_name datatypeTo delete a column from a table, use the following syntax:
ALTER TABLE table_nameDROP COLUMN column_nameNote: Some database tutorial
MySQL tutorials How to create a database tutorial and delete a database
Creating table SyntaxCREATE DATABASE ;Quite simply, look at a simple example
Mysql>Mysql>mysql> CREATE DATABASE myDatabase;Query OK, 1 row affected (0.03 sec)
MySQL tutorial full-text Search, SQL writing:MATCH (Col1,col2,...) Against (expr [in BOOLEAN MODE | With QUERY expansion])
Like what:SELECT * from articles WHERE MATCH (title,body) against (' database ');
The MATCH () function performs a natural
The following provides a tutorial on MySQL tutorial connection code, we now use the ASP tutorial. NET C # method to connect the MySQL database and display the data, the code is implemented as follows.
simple Data
Recently, I got a private activity and a warehouse receiving and picking system. The development cycle is from 30 days to 60 days.The final decision of the entire project is implemented using the java client + mysql server. Therefore, some necessary
1. Semicolon exceptionsFor MySQL, the first thing you must remember is that every line of its command is ended with a semicolon (;), ...... There is no such thing as absolute. The same is true here. When a MySQL line is inserted in the PHP code, it
Database systems are the core of management information systems. Database-based online transaction processing (OLTP) and online analytical processing (OLAP) are one of the most important computer applications of banks, enterprises, governments, and
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