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
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
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,
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
With the help of explain, you know when to add an index to the table to use the index to find records and make the select run faster.If some problems arise due to improper use of the index, you can run analyze table to update the table's statistics,
In mysql, we only need to use alter to modify the data table fields. Below I will introduce how to modify the table field name, field length, and field type in mysql, for more information, see.
Let's take a look at common methods.
The simple Syntax
PHP gets the MySQL data table field name and details method, MySQL field
First we need to understand the SQL statements that query MySQL database/table related information:
Copy the Code code as follows:SHOW DATABASES//Lists the MySQL Server
Install MySQL1. Download the MySQL Installation FileThe following two files are required to install MYSQL:MySQL-server-5.1.7-0.i386.rpm
To download the above two RPM files, locate the "server" and "client programs" items and find the items
Mysql adds and deletes the field type, mysql Field
Add a MySQL field:
Alter table 'user _ movement_log 'Add column GatewayId int not null default 0 AFTER 'regionid' (AFTER which field is added)
Delete field:
alter table `user_movement_log` drop
1. Download the MySQL Installation FileThe following two files are required to install MYSQL:MySQL-server-4.0.23-0.i386.rpmMySQL-client-4.0.23-0.i386.rpmTo: http://www.mysql.com/downloads/mysql-4.0.html, open this webpage and pull down the webpage
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.