Compared to other methods to achieve MySQL's read and write separation, the use of thinkphp framework to achieve MySQL read and write separation is simple and easy-to-use, the configuration file sample code is as follows:
' Db_type ' => ' mysql
Before the Server Configuration Test service environment, I lazy easy to use the online ready-made script to install, the result of MySQL can not start, so I only honestly reinstall MySQL Server, originally thought Apt-get--purge this kind of
Microsoft's Visual Studio does not have its own driver to connect to MySQL, to download a mysql-connector-net-6.4.3 driver on the Internet, and then install it to use.
The following is a class that I encapsulate to connect the database, call
Fristpinyin: This function converts the first character of a Chinese string into a pinyin (for example, "Chinese"->z)
Copy Code code as follows:
CREATE FUNCTION ' Fristpinyin ' (p_name VARCHAR (255)) RETURNS VARCHAR (255) CHARSET UTF8
The two days in the website moved, this site to move the use of direct packaging MySQL database and Web files in the form of migration, upload good MySQL data directory inside the database to the VPS MySQL storage database directory inside,
First, the premise
The principle here is only for MySQL database, other database some is the same, some still exist differences. My summary is also the general rule of MySQL, special treatment for some special cases. Develop good habits when
The MySQL database can use triggers to make it impossible to modify the data in some fields without affecting other fields being modified.
DROP TRIGGER IF EXISTS ' members ';
SET @OLD_SQL_MODE =@ @SQL_MODE, sql_mode= ';
DELIMITER//
CREATE
Several common ways to find MySQL subqueries:
Copy Code code as follows:
SELECT * from xxx where col = [Any|all] (SELECT * from XXXX);
This syntax can be divided into keyword and without keyword writing, when the keyword is not
Scene:Main Library Db:utf8 Character setDB:GBK character set for standby library
Demand:Verifies that the primary data is consistent and fixes
Validation process:Set the main library connection to UTF8, set the standby connection to GBK, query
This example shows a script python used to convert the table configuration data XML and generate the corresponding parsing code.But in the Chinese code on the emergence of garbled, the solution is to share out for everyone's reference.
The specific
The newly installed MySQL has two databases: Information_schema and MySQL. What are they for? Can you delete it?
Of course it is not to be deleted.
The
1.information schema is all the dictionary information used by the MySQL system, including
1. Use of arrays in PHP
Using associative arrays (associatively-indexed arrays) is very helpful when manipulating a database, so let's look at an array traversal of the basic number format:
Copy Code code as follows:
$temp [0] =
New installed Windows7 64-bit system, equipped with many things, there is always such a son of Congi, yesterday in the beginning to decorate Php+apache, echo phpinfo () completely no problem, but the once connection MySQL will render the page is
The example of this article describes the python operation of MySQL simple implementation method. Share to everyone for your reference. The specific analysis is as follows:
First, Installation:
installing MySQL
Install MySQL Needless to say,
Copy Code code as follows:
Class dbclass{//Start Database class
var $username;
var $password;
var $database;
var $hostname;
var $link;
var $result;
function Dbclass ($username, $password, $database, $hostname = "localhost") {
This article illustrates how JDBC operates on the MySQL database boolean field. Share to everyone for your reference. The specific analysis is as follows:
In the MySQL database if you want to use a Boolean field, it should be set to the bit (1)
In front of the site an article introduced how to achieve the publication of micro-blog said: Php+mysql+jquery implementation of the release of Micro-blog program--jquery, this example will be based on its database structure, the dynamic way to
Orm
MySQL's table structure is a two-dimensional table, expressed in Python data structure is a list, each record is a tuple. As shown below:
[(' 1 ', ' Huangyi '), (' 2 ', ' Letian '), (' 3 ', ' Xiaosi ')]
This line is not easy to see the
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