Instance One
The code is as follows
Copy Code
PNR code connection in China$hostname = "127.0.0.1"; The IP address of the MSSQL server or the name of the server$dbuser = "sa"; The account number of the MSSQL
A common understanding error: MySQL does not execute SQL statements when executing explain, in fact, if the query's From field has a subquery, explain executes the subquery.
Explain can only interpret select queries, and Update,delete,insert needs
After MySQL is installed, there are many parameters that need tuning. Almost all of the content involved in tuning can be set up in the My.cnf file. The number of MySQL connections is also one of the more important tuning parameters. MySQL's default
1. Start from database structure 1. The definition of a field type follows the following rules: 1. Select the minimum length of the field 2. Use fixed length 3 as much as possible to define "not NULL" 4. Avoid using "Zerofill" in numeric fields
1. To optimize the query, you should try to avoid full table scan, first consider the where and the order by the columns involved in the establishment of the index.
2. The null value of the field in the WHERE clause should be avoided as far as
Solutions under Windows: My.ini inside the mysqld partJoin lower_case_table_names=2 [Mysqld]lower_case_table_names=2Set-variable=lower_case_table_names=0Port= 3306 Note: 1 indicates that case-insensitive 2 indicates case sensitivity Then reboot the
MySQL can record all slow queries and record the SQL statements in the specified file, or you can add updates through the Mysqlbinlog record, or you can restore the database through Mysqlbinlog.
MySQL Slow query record
Edit My.cnf File
Linux is
Method One
We use phpMyAdmin to back up the database before installing the MySQL database, then we can import it directly after installation.
Method Two
1, first in the operation of the input services.msc, to find a MySQL service, to stop it;
2,
I. Major changes from 4.0 to 4.1
If you created a InnoDB table containing timestamp fields in the MySQL tutorial 4.1.0 to version 4.1.3. You need to rebuild the table when upgrading to 4.1.4 and higher because the storage format has changedStrings
MySQL tutorial import. SQL data implementation several methods
The method is as follows:1. Connect with Jive User first:E:mysqlbin>mysql-u jive-p Jive2. Run the following command again:Mysql>. F:workingfolderjivejdondatabasejive_mysql.sql
My
A lot of times, MySQL data will be very large, the data by default in the/var/lib/mysql, because the/var divided the space is not big enough, so we need to change the MySQL data storage path, put it into the large partition, in order to be able to
MySQL Tutorial database Tutorial Connection ClassesThis article provides a perfect PHP tutorial MySQL database connection class program, simple example.
*/Class db{
var $linkid;var $sqlid;var $record;
function db ($host = "", $username = "",
An error is always prompted when importing SQL statements today.The code is as follows:ERROR 2013 (HY000): Lost connection to MySQL server during queryERROR 2006 (HY000): MySQL server has gone awayNo connection. Trying to reconnect...ERROR 2002 (HY00
How does MySQL simplify external Union?In many cases, the expression of a table in the FROM clause can be simplified.During the analysis phase, queries with right outer join operations are converted to equivalent queries that only contain left join
Type: free space.Supported: php + mysqlAdvanced and high traffic for new beginnersThe disk space is 250 MB 500 1 GB 2 GB10 Gbit/s, 20 Gbit/s, 40 Gbit/s, 75 Gbit/sPlug-in domain unlimitedDomain name parking unlimitedSub-infiniteEmail account
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