The examples in this article describe the connection MySQL class and usage in PHP encapsulation. Share to everyone for your reference, specific as follows:
Class mysql{Private $db _name, private $db _host, private $db _user, private $db _pwd,
From_unixtime () is the time function in MySQL
Date is the parameter that needs to be processed (this parameter is a UNIX timestamp), can be a field name, or it can be a UNIX timestamp string directly
The '%y%m%d ' behind is primarily to format the
Description: I'm here to store the MySQL database directory /var/lib/mysql The following pw85 database back into the /home/mysql_data, and Save as Mysqldata_bak_2012_04_11. The tar.gz compressed file format (2012_04_11 refers to the date of the day
Today, the Chinese blog Alliance has bo friends feedback, zgboke.com can not submit blog, I was just ready to go to the Holiday Plaza Party, on the rush to submit a trial, found that the blog submitted when the following error is reported:
Tip
This example describes how MySQL uses temporary tables to speed up queries. Share to everyone for your reference. The specific analysis is as follows:
With a MySQL temp table, sometimes you can speed up the query, and here's a detailed description
The example in this article describes how to delete MySQL duplicate data. Share to everyone for your reference. The specific methods are as follows:
Project background
In a recent Linux performance acquisition project, found that the thread of the
In the process of using MySQL, there are some questions about the concepts of MyISAM and InnoDB, and the difference between the two engines has always been a question in my mind. To solve this puzzle, we searched the network and found the following
mysql command line export database: 1, into the MySQL directory under the Bin folder: cd MySQL to the Bin folder directoryAs I entered the command line: CD C:\Program files\mysql\mysql Server 4.1\bin(or add the directory directly to the environment
This example describes the MySQL settings to specify the IP remote Access connection method, share for everyone to reference. The implementation methods are as follows:
1. The authorized user root uses the password jb51 to connect to the MySQL
Resolves can ' t connect to MySQL server ' localhost ' (10048), commonly seen in Windows 2003 servers using MySQL.
Why the error occurred:
Applications need to quickly release and create new connections, but because the connections that exist in
First, modify the Linux default IO scheduling algorithm.
Linux default IO scheduling algorithm for CFQ, need to modify to Dealine, if it is SSD or PCIE-SSD equipment, need to modify to NoOp, you can use the following two ways to modify.
1, online
If you need to include a column in the column that the query statement returns that represents the line number in the entire result set, the ISO sql:2003 Standard proposes a method that provides the row_number ()/RANK () function. Standard methods
1 group_concat
Mysql> SELECT Student_name,-> Group_concat (Test_score)-> from Student-> GROUP by Student_name;
Pre
Mysql> SELECT Student_name,-> Group_concat (DISTINCT test_score-> ORDER by Test_score DESC SEPARATOR ')-> from Student-> GROUP
When you first install MySQL on a machine, the authorization table in the MySQL database is initialized like this:
You can connect as root from the local host (localhost) without specifying a password. Root user has all permissions (including
-------------------Quote begin------------------------3. If you decide so you can skip the next statement from the master, issue the following statements:mysql> SET GLOBAL S Ql_slave_skip_counter = n; Mysql> START SLAVE; The value of n should be 1
JDBC believe that everyone is not unfamiliar, as long as it is a Java, first contact with the EE is to learn such things, who called the program and the database to deal with it! And JDBC is a database dealing with a very basic knowledge, but also
Solution:
Open the SQL file and add the following in the first line of the SQL file
/*!40101 SET NAMES UTF8 * *;
Save SQL file as UTF-8 NO BOM format
Upload the SQL file via FTP, and put it in the root directory.
Enter your cpanel, see
1. The fields that will be used frequently (such as frequently using these fields for sorting, or for searching), are best indexed.
2. The type of field can be as int or tinyint as possible. The other field uses not NULL as much as possible.
3. Of
Linux installed after the initialization of the MySQL database, the use of Mysqld_safe to start the MySQL database, the following found that failed to start
[Root@svnserver bin]# ./mysqld_safe–user=mysql&
Or
[Root@svnserver
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