1. Display the list of databasesshow databases; # View all current databasesShow Databases \g #以行的方式显示2. On the command line, execute the SQL statementMysql-e ' show databases '-uroot-p123456mysqlshow-uroot-p123456 # not used, just remember the one
// Primary key
alter table tabelname add new_field_id int(5) unsigned default 0 not null auto_increment ,add primary key (new_field_id);
// Delete a column
alter table t2 drop column c;
// Rename a column
alter table t1 change a b integer;
// Change
MySQL常用指令,java,php程序员,数据库工程师必备。程序员小冰常用资料整理MySQL common commands (for reference)The most common display commands are:1. Display the list of databases.show databases;2. Display the data table in the library:Use MySQL;Show tables;3, display the
First MySQL updates a field of data, which is generally written like this:
UPDATE mytable SET myfield = ' value ' WHERE Other_field = ' other_value ';
You can also use in to specify the records to update:
UPDATE mytable SET
One: Field modifier1:null and NOT NULL modifiersLet's take a look at this example.Mysql> CREATE TABLE worker (ID int not null,name varchar (8) Not null,pass varchar (a) not null);Mysql> INSERT into worker values (1, ' HA ', ' 123456 ');Mysql> INSERT
I've had a bit of trouble lately. Newly installed PHPwind6.0 official version of the community before the introduction of the member account data, found that many members of the mail address seemingly random fill in, before the PHPwind5.5 version
1. download MySql
1. download MySql
Open http://www.mysql.com/downloads/mysql/#downloads download in browser
My downloaded version is Red Hat 5 version of http://www.mysql.com/downloads/mirror.php? Id = 407552
Upload the file to the server, or
One, MySQL installationInstall MySQL under CentOS Please open: http://www.centoscn.com/CentosServer/sql/2013/0817/1285.htmlIi. several important directories of MySQLMySQL installation is not as if SQL Server is installed by default in a directory,
Pessimistic locking, as its name implies, is a conservative attitude to the data being modified by the outside world (including other transactions currently in the system, as well as transactions from external systems), so that the data is locked
I. Commonly Used MySQL command line commands1. Start the MySQL service. Net start MySQL
Stop MySQL service. net stop MySQL
2. netstat-Na | findstr 3306: Check the listening port. findstr is used to check whether the following port exists.
3. log on
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.