This section of the database connection class, he will automatically load SQL anti-injection function, filtering some sensitive SQL query keywords, but also can increase the Judgment Field Show table status of nature and Show table class to get all
code is as follows
copy code
Require_once './includes/reader.php ';Excelfile ($filename, $encoding);$data = new Spreadsheet_excel_reader ();Set output encoding.$data->setoutputencoding (' GBK ');"Data.xls" refers to the Excel
The code is as follows
Copy Code
Class cls_mysql{var $querynum = 0;var $link;var $histories; var $dbhost;var $dbuser;var $dbpw;var $dbcharset;var $pconnect;var $tablepre;var $time; var $goneaway = 5; Function Connect ($dbhost,
In general, when we manage the Linux VPS Server Web site database, most of them use the phpMyAdmin panel to visualize the management database. At night a netizen told the original can login phpMyAdmin today, but the website operation is normal,
///Access library convert to MySQL database tutorial The friend who does not understand can add qq:345838256///////////////////////////////////I collect data is access, But my program is MySQL, so write a program, the program three steps to share ...
knows.nl bied free access to Particulieren,bedrijven Chinese Verenigingen on the river.
Aanmelden voor Eyne website geheel kostenloos Dietegen to meet with the newspaper Registratie Formulier.
DirectAdmin controlpanel,php and MYSQL,100MB, 1 of the
1. First, verify that the server is in a secure state, that is, no one can arbitrarily connect to the MySQL database.Because the MySQL database is completely out of password protected during the reset of the MySQL root passwordState, other users can
Use the MySQL command to connect to the MySQL server, execute "select version () command to confirm the MySQL release.
Username and password Specify the username and password that can be used to connect to the MySQL database.
# mysql-uusername-p '
PDO MySQL Introduction
The PHP Data Objects (PDO) extension defines a lightweight, consistent interface for PHP access to the database. Each database driver that implements the PDO interface can expose specific database features as standard
Length: is a calculation of the lengths of a field a Chinese character is counted three characters, a number or letter is counted as a character
The Char_length (str) return value is the length of the string str, and the length of the unit is a
Regexp
Example 1. The query field contains data that is not in English
The code is as follows
Copy Code
SELECT *From ' M_user 'WHERE ' Emp_no 'REGEXP ' [^-~] ' =1
Column 2. So I can get all the English-free
• View the size of each library
The code is as follows
Copy Code
SELECT SUM (data_length) +sum (index_length) from information_schema.tables WHERE table_schema= ' database_name ';
The result is in bytes, except
Master's is the mark? MySQL, Slave replaced Percona, did not expect to keep up with progress, and Slave and Master gap more and more distant.
Document and description of InnoDB efficiency adjustment and correction Found by file has a parameter
1. Export the entire database (–hex-blob for BLOB data, prevent garbled and import failures)
Mysqldump-u user name-p database name > exported file name
The code is as follows
Copy Code
Mysqldump-u
A simple way to remove duplicate values from MySQL
Example:
TableID Name1 A2 b3 C4 C5 b
The library structure is probably like this, this is just a simple example, the actual situation will be much more complicated.
For example, I want to use a
In the use of Weaving dream dedecms, opened the dream of the main column, Deputy column function. And the Secondary column field in the MySQL database Typeid2 is a comma, separate column ID composition string. Need to query the column article, the
1005: Failed to create table1006: Failed to create database1007: Database already exists, failed to create database1008: Database does not exist, delete database failed1009: Unable to delete database file causes database failure to be deleted1010:
In fact, the MySQL automatic backup of the small script is very simple, the following is the steps of this small script.
The code is as follows
Copy Code
#cd/www#mkdir Mysqlbackup#vi mysqlautobackup.sh
This
1.linux under the command to start MySQL:
The code is as follows
Copy Code
Mysqladmin start/ect/init.d/mysql Start (Previous installation path for MySQL)
2.linux Restart MySQL command:
The code 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