/*
The code is as follows
Copy Code
* Created on 2010-4-21** The class for control MySQL** Made by S71ence** @ $host* @ $user _name* @ $user _pwd* @ $data _base* @ $coding*/Class MySQL{private $host;//Host NamePrivate
If you want to display MySQL a specified database table name the method is very simple, MySQL provides a show tables command, it returns a data, the following I do a detailed example, tested fully available*/
The code is as follows
First we wrote a a.bat processing file, the code is as follows
The code is as follows
Copy Code
net stop MySQLxcopy D:phpstudymysqldataabc*.* d:up%date:~0,10%/ynet start MySQL
NOTE: ABC is the name of your
MySQL can use auto_increment to set the value of the primary key is self growth, its default value is 1, if you want to set its initial value to 1000, the more stupid way is to insert a record and specify the primary key value of 999, and then
First, the database design
Moderation of the inverse paradigm, the attention is moderate
We all know the three paradigms, the model based on the three-normal paradigm is the most efficient way to save data and the easiest mode to extend. When we
MySQL has been supporting inserts since version 4.1 ... On DUPLICATE KEY UPDATE syntax, which requires 3 SQL statements (select,insert,update) to be executed, and reduced to 1 statements to complete.
For example, the Ipstats table structure is as
Program backstage this error at com.mysql.jdbc.MysqlIO.readFully (mysqlio.java:2332), * * End NESTED EXCEPTION * * Last packet sent to the "s Erver was Ms ago.
The main reason for this problem is that the application server has not been connected
MySQL server after the installation of parameter adjustment and how to optimize MySQL performance, directly using the default MY.CNF parameters, of course, in most cases is not a problem. To gain performance gains and reasonable utilization of
Yesterday a server on a strange problem, normal access when the MySQL appears "error 1040, too many connection" error prompts, which is usually max_connections set too small or wait_ The timeout value setting is too long to cause the connection
Concepts & FunctionsBinary logging means that when you do a data flow operation, the database records the SQL operations in addition to the Select, such as UPDATE, DELETE, alter ..., and the type of record contains the full SQL statement, operation
To increase user action rights
Grant all privileges in ' db_name '. * to ' user_name ' @ ' HOST ' with GRANT OPTION;
Grant normal data user, the right to query, insert, UPDATE, and delete all table data in the database.
Grant SELECT on testdb.*
Error tips
The error code is 1130,error 1130:host 10.0.0.1 are not allowed to connect to this MySQL server
Solutions
Problem with user permissions for remote connection cannot be given.The results of this operation of the MySQL library, you can
The MySQL order BY keyword is used to classify the data in the record.
MySQL ORDER BY keyword classified by keyword
The ORDER BY keyword is used to classify the data in a record.
The code is as follows
Copy Code
SELECT
Specify the location of the log in the configuration file.
The windows:windows configuration file is My.ini, usually under the MySQL installation directory or c:windows.The Linux:linux configuration file is my.cnf, usually under/etc.
You can also
Problem status
Restart MySQL is also a failure, look at the errorlog of MySQL, you can only see the following information similar to:
Forcing close of thread 12232 User: ' Root '
With mysqladmin simple monitoring of the next MySQL situation:
A bunch of methods were found on the internet as follows:
1. May be the/usr/local/mysql/data/rekfan.pid file does not write permissionWorkaround: Give permission, execute "chown-r mysql:mysql/var/data" "Chmod-r 755/usr/local/mysql/data" and restart
Use phpMyAdmin to import the database, but there are file upload size limits, upload time, timeout and other issues, the use of shell commands more convenient.
First step: Open cmd. Start--> cmd
Step two: Switch to MySQL installation directory
An error occurred when inserting a MySQL database due to a nickname with symbols.
Mysql utf8 encoding can contain up to three bytes, while Emoji expressions or some special characters are 4 bytes.
Therefore, an error occurs when a nickname with an
/** The template paging class is derived from the paging method of the database tutorial in the easp tutorial. It is an independent php version of the easp paging.* Supports dynamic and static paging.** Page ([total number of records = 1], [page
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.