problem : Linux on MySQL out table ' xxx ' doesn ' t exist errorcause : MySQL on Linux defaults to case-sensitive results.Fix : Change MySQL configuration file, in my.cnf [mysqld] below (position cannot be wrong) Add lower_case_table_name=1 this
PHP MySQL Data Deletion Delete
The DELETE statement is used to record the deletion table.Delete data from a databaseThe deletion of the declaration is used to delete records from the database table.Grammar
DELETE from table_name WHERE
At present, most of the business scene with InnoDB has been completely done, more and more business from MyISAM to InnoDB engine, then what are the considerations? When you understand the difference between the two engines, it's easy to know what
This article describes how to create, view, and delete MySQL table indexes with SQL statements.
1. See which tables add indexed SQL statements
The code is as follows
Copy Code
Mysql> Show index from Tblname;Mysql> show
Usage instructions
1 ifnull (EXPR1,EXPR2)
If EXPR1 is not Null,ifnull () returns EXPR1, it returns EXPR2.
Ifnull () returns a numeric or string value, depending on the context in which it is used.
For example:
The code is as follows
When there is a uniformity error in the contents of a database field, we can replace it using replace in the MySQL statement to replace the correct content with the wrong content.
Update table SET field name =replace (field name, ' replaced content
For example, you can do this:
The code is as follows
Copy Code
Mysql> INSERT into Tbl_name (col1,col2) VALUES (15,col1*2);
When you insert multiple database records, we often write this:
The code
Group_concat () is a function provided by the MySQL database, usually used with group by.
Grammar:
Group_concat ([DISTINCT] expr [, expr ...][ORDER BY {Unsigned_integer | col_name | expr}[ASC | DESC] [, col_name ...]][SEPARATOR Str_val])
1. For
The Open method is simple: Edit the/etc/my.cnf file and add under the [mysqld] section: Log=/var/lib/mysql/sql_row.log Line (the path of the log itself is defined as needed).
The code is as follows
Copy Code
If you accidentally forget the root password, or as I do wrong operation of the root permissions to the minimum, you do not have to panic, use the following steps to easily retrieve the password:
Method One
1. Run MySQL in safe mode and skip
An instance of building a library and building a table
The code is as follows
Copy Code
Drop database if exists school; Delete if there is schoolCreate Database School; Build a library SchoolUse school; Open Library
For example: Duplicate entry for key 3 means that the 3rd field in the table has a unique index limit, and you need to insert other distinct values or remove the unique properties of the field.
Look at an example
If you have a phpmyadmin on your
Use of the Alter command in MySQL to edit the table structure.
Modify Table Name
The code is as follows
Copy Code
ALTER TABLE test rename test1;
Modify a field type
The code is as follows
Copy
As shown in the following table:
The code is as follows
Copy Code
CREATE TABLE ' T1 ' (' UserID ' INT (one) DEFAULT NULL,' Atime ' datetime DEFAULT NULL,KEY ' Idx_userid ' (' userid ')) Engine=innodb DEFAULT Charset=utf8;
First through the chkconfig command to see MySQL in the Not manageable list, the command is:
Chkconfig--list If this is not mysqld in the list, you need to add this command first:
Chkconfig Add mysqld
Then use this command to set the boot up:
I used apache in the past. Due to work needs, I had to configure the php environment of iis. I found some information on the Internet and configured it at once. In fact, I have experience with apache + php + mysql, this is easy to understand. Let's
I. INTRODUCTION to PHP/MySQLYou should have heard of open source software (OSS) unless you have been on Mars for the last six to eight months. This movement has a huge impact and has attracted the attention of some large companies. Like Oralce and
Completely freeDomain format: yourchoice.599megs.comEnter the community function24/7 full FTP accessStorage space of 599 MB3rd Gbit/s bandwidthEasy-to-use control panelSupported forumsPHP and MySQL databases! Application address:
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.