In the Windows Server
Locate the php.ini file for the PHP installation directory and then we searchExtension=php_pdo.dll this line to see if there is a semicolon in front of the line, and if so, remove it. and find out if there are any
1.
The code is as follows
Copy Code
$connection =mysql_connect ("localhost", "root", "password"); Connect and select a database servermysql_select_db ("Test", $connection);$query = "INSERT into users (user_name)"; Insert
The MySQL Query Table Index command has two forms of command:
The code is as follows
Copy Code
Mysql> Show index from ' tblname ';Or:Mysql> show the keys from ' tblname ';
The results of running the above
Server 120G SSD hard disk space used 92%, after inspection found that the original MySQL binary log is not in time to remove, occupy a lot of space, so directly with the command: Reset master a delete clean.
The code is as follows
To improve the security of the server, this lesson is mainly about how to modify the MySQL port under Linux. Support for most system changes in Linux environments, such as CentOS and Ubuntu.
Demo Environment:
Linux CentOS 6.3 X32Mysql 5.1.66
A set can contain up to 64 members whose value is an integer. (Set type base check MySQL data type set type) The binary of this integer indicates which members of the set's value are true. For example, there is a ' Status ' set
The code
MySQL is crazy to eat memory, just started the memory only accounted for 700M, Half a day after 1.5G, running 2 days after the 3G memory, including FP, previously restarted MySQL down, so I set the scheduled task to automatically restart MySQL every
Today, a WIN2003 statistics server, a statistical failure, the MySQL error log shows:
Mysqld-nt.exe:sort aborted
Probably say the MySQL sort interrupt. (sort aborted-sorting canceled)
This error message means that the system is difficult to
There are a lot of things that are not equal in our project. Writing this article today is a simple analysis of how to optimize the method.The table logic here is divided according to the number of user_name groups in the T_group table.Because this
How MySQL sets the password
There are many ways:1. After using root into MySQLMysql>set Password =password (' your password ');Mysql>flush privileges;
2. Use the GRANT statementMysql>grant all in *.* to ' root ' @ ' localhost ' identified by '
MySQL stored procedure instanceTechnical points
A stored procedure includes a name, a list of arguments, and a set of SQL statements that can include many SQL statements. The following is the process of defining a stored procedure:
CREATE
Delete Deletes multiple table data, how can you delete data from multiple relational tables at the same time? Here's an in-depth explanation:
The code is as follows
Copy Code
1 delete from T1 where condition2 delete t1
In MySQL can be used to achieve a multiplier effect, in the php,asp have a regular expression of this said so MySQL is what it is, I take an example to find the filtered field for the Chinese record SQL statement.
For example, to use MySQL to
For LTrim () and RTrim (), from the perspective of their English interpretation:
The following is a reference fragment:PHP is: Strip whitespace (or other characters)MySQL as: space characters removed
Obviously, PHP can also have "other characters",
Actually prepared to learn the PHP language has been planned for several years, but are busy with some things do not meditate, given the needs of the project, must learn some technology, so ready to the front-end, front-end framework and PHP this
Often encounter the need to export data from the database to Excel files, with some open source class library, such as Phpexcel, it is easy to implement, but the support for a large number of data is very bad, it is easy to reach the PHP memory
Recently in the play Ubuntu, loaded php+mysql environment, with Navicat connection MySQL found how also not connected, even if the root set to% after still invalid, so found that the MySQL 3306 port is not open to the outside world, find the reason
Alter table: add, modify, and delete TABLE columns, constraints, and other TABLE definitions.View column: desc table name;Alter table t_book rename to bbb;Add column: alter table name add column name varchar (30 );Delete column: alter table name
A mysql error occurs. In the past, I often used to guess. With this table, I found it as soon as I checked it out. This is much more convenient.1005: An error occurred while creating the table.1006: database creation failed1007: The database already
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