3.3 Creating, deleting, and selecting databasesMySQL provides three database-level statements: Create database for creating databases, drop database to delete databases, use to select the default database.1. CREATE DATABASE StatementCreating a
A useful common statement.
MySQL Display database or table:
The following are the referenced contents:Show databases;//can then use database_name;Show tables;
MySQL Change table name:
ALTER TABLE table_name rename new_t;
MySQL Add columns:
A custom Function (UDF) extends MySQL by using a new function like an intrinsic (built-in) function like ABS () or CONCAT ().
CREATE [AGGREGATE] FUNCTION function_name RETURNS {STRING|INTEGER|REAL} SONAME shared_library_name DROP FUNCTION
Use the shell to write a script to monitor the running state of the MySQL process, test if you can connect to MySQL, if not, send an email to the police. As for how to monitor, in fact there are many commands, such as most of the commands in the
Linux operating system: centOS6.3 64bit
nginx:nginx-1.4.0
mysql:mysql-5.6.10
php:php-5.4.13
I. Installing the development pack (using the default CentOS update source):
# yum-y Install wget gcc-c++ ncurses ncurses-devel cmake make Perl bison
1, Field
Fields are similar to column meanings, database columns are generally called columns, and fields generally refer to calculated fields
2, splicing the field
Stitching--Connecting values together to form a single value
Concat () function
"Guide" This article is divided into two parts, the first part of my motives for this conversion, and step-by-step explanation of how the existing MySQL data into the postgres. The second part will explain how to adjust PHP to the new database
1. Create a table
MySQL Create a table is implemented through CREATE TABLE statement, syntax here is not introduced, very complex, you can go to the official online query, fortunately, we do not need to remember all the options, because most of the
This article is the creation of a function in MySQL "ERROR 1418" solution to the detailed analysis of the introduction, the need for friends to copy the
code code below:
Error code:1418
This function has none of the deterministic, NO SQL, or reads
Mysql+php generated garbled reason:
MySQL database default encoding is UTF8, if this code and your PHP page is inconsistent, may cause MySQL garbled;
MySQL creates a table when you choose an encoding, if this encoding and your Web page encoding is
Mysql|oracle
This is my comparison's installing and getting started with Oracle 10g, PostgreSQL 8 and MySQL 5. This is what I consider the comparison of the ' art for three categories to db:commercial vs. Academe vs. Internet Model. This is a
Log on to the database"Command prompt character" window entry,Input CD C:mysqlbin and press ENTER to switch directory to CD C:mysqlbinAnd then type the command mysql-uroot-p, enter after the prompt you to lose the password, if just installed MySQL,
MySQL Display database or table:
Show databases;//can then use database_name;
Show tables;
MySQL Change table name:
ALTER TABLE table_name rename new_t;
MySQL Add columns:
ALTER TABLE table_name ADD column c_n column attributes;
MySQL Delete
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.