ALTER table: Add, modify, delete table columns, constraints, and other table definitions.View column: Desc table name;Modify table name: ALTER TABLE T_book Rename to BBB;Add column: ALTER TABLE name add column name varchar (30);Delete column: ALTER
System variables can be modified auto_increment_incrementMysql>SHOW VARIABLES like 'auto_inc%'; +--------------------------+-------+|Variable_name|Value|+--------------------------+-------+|Auto_increment_increment| 1 | View Step
Today in the Web page to insert data into the database, found that the inserted Chinese data in the database is displayed in the table is a question mark, in the online tutorial tried a lot of methods have no effect, and finally found a solution1.
1. Use the command show variables to view the current maximum number of connections like ' %max_connections% ';Use the command set global max_connections to set the maximum number of connections:set global max_connections=1400;Use the command show
First of all must have the foreign key, InnoDB what does not say, directly on the change sentence.ALTER TABLE ' t_terminal ' DROP FOREIGN KEY ' fk704405e7f06a14ef '; ALTER TABLE ' t_terminal ' ADD CONSTRAINT ' fk704405e7f06a14ef ' FOREIGN KEY ('
# # Root user to modify their own password # The first method: Modify the mysqladmin-u root-p password "test" through the mysqladmin command will prompt you to enter the old password after the terminal type the above command, enter the password to
at work, we will encounter the need to change the database storage location, such as: the original database where the disk space is insufficient, and so on. compiling the installed Mysql[[Email protected] ~]# service mysqld status # First see MySQL
1 Viewing system-supported storage enginesShow engines;2 Viewing the storage engine used by the tableTwo methods:A, Show table status from Db_name where name= ' table_name ';b, show create TABLE table_name;If the displayed format is not good-looking,
Mysql> ALTER TABLE name modify column field name type;For exampleThe Deploy_updateapp table Status field in the database is varchar (30)Modification types can be used (careful modification of types may result in errors in existing data)Mysql> ALTER
When using MySQL, you often encounter table names that do not conform to specifications or standards, but the tables already have a lot of data, how to keep the data, just change the table name?You can import the original data into a new table by
In the Apache, PHP, MySQL architecture, MySQL has the greatest impact on performance and is a key core. For the discuz! Forum program is also the case, MySQL settings are reasonable optimization, directly affect the speed and capacity of the forum!
Directory
Mysqladmin command
UPDATE User Statement
SET PASSWORD Statement
Root password loss (to be verified)
The
mysqladmin command (headings) is formatted as follows (where user is the username, password is
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 X32
Mysql 5.1.66
MySQL is a real multi-user, multi-threaded SQL database server. MySQL is implemented as a client/server architecture, consisting of a server daemon mysqld and many different client programs and libraries. Due to the openness and stability of its
MySQL Tutorial modify table/Field Add/Remove Table index
CREATE TABLE Test (Blob_col blob, index (Blob_col (10)); in MySQL 5.1, for MyISAM and InnoDB tables, the prefix can be up to 1000 bytes long. Note that the prefix limit should be measured in
one, the connection MySQL. Format: mysql-h host address-u user name-P user Password1, Example 1: Connect to MySQL on this machine.First in the Open DOS window, and then into the directory Mysqlbin, and then type the command mysql-uroot-p, enter
GROUP by Modify Program。
Imagine a table named sales with a profit column for the year, country, product, and record sales profit:
CREATE TABLE www.111cn.net
(
Year INT is not NULL,
Country VARCHAR is not NULL,
Product VARCHAR not NULL,
MySQL to create a database when the specified encoding is important, many developers have used the default encoding, garbled problem is impossible to guard against. The coding of the database can avoid the garbled problem caused by the pouring of
Some times you may need to bulk convert the MySQL table engine, as follows for PHP operations
/**
* Bulk conversion MySQL table engine
*/
Error_reporting (E_all);
Database Connection Configuration
$host = ' localhost ';
$username = ' root ';
$passwd
This example describes a workaround for MySQL to modify the my.cnf configuration. Share to everyone for your reference, specific as follows:
First, the question:
After modifying the MY.CNF configuration file, it does not take effect, what is this?
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.