mysql数据库备份
E:\databases\MySQL\MySQL Server 5.1\bin>mysqldump --help
mysqldump Ver 10.13 Distrib 5.1.30, for Win32 (ia32)
By Igor Romanenko, Monty, Jani & Sinisa
This software comes with ABSOLUTELY NO WARRANTY. This is free softwa
and you are welcome to modify and redistribute it under the GPL lice
Dumping definition and data mysql database or table
Usage: mysqldump [OPTIONS] database [tables]
OR mysqldump [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]
OR mysqldump [OPTIONS] --all-databases [OPTIONS]
Default options are read from the following files in the given order
C:\WINDOWS\my.ini C:\WINDOWS\my.cnf C:\my.ini C:\my.cnf E:\databases
Server 5.1\my.ini E:\databases\MySQL\MySQL Server 5.1\my.cnf
The following groups are read: mysqldump client
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit
--no-defaults Don't read default options from any options
--defaults-file=# Only read default options from the given fil
--defaults-extra-file=# Read this file after the global files are re
-a, --all Deprecated. Use --create-options instead.
-A, --all-databases Dump all the databases. This will be same as -
with all databases selected.
-Y, --all-tablespaces
Dump all the tablespaces.
-y, --no-tablespaces
Do not dump any tablespace informati
相关文档:
#include "winsock.h"
#include "mysql.h"
void query_example(void)
{
MYSQL *pDbCon = NULL;
char *pszHost = "localhost";
char *pszUser = "guest";
char *pszPsw = "";
char *pszDbName = "mysql_db_name";
int iPort = 3306;
pDbCon = mysql_init((MYSQL*) 0);
if (NULL != pDbCon)
{
......
就象许多的PHP开发者一样,在刚开始建立动态网站的时候,我都是使用相对简单
的数据结构。PHP在连接数据库方面的确实是十分方便(译者注:有些人认为PHP在连接不同数据库时没有一个统一的接口,不太方便,其实这可以通过一些扩
展库来做到这一点),你无需看大量的设计文档就可以建立和使用数据库,这也是PHP获得成功的主 ......
MySQL基本数值类型大致可以分成:
整数类型:TINYINT、SAMLLINT、MEDIUMINT、INT、BIGINT--1字节、2、3.、4、8
浮点数类型:FLOAT(m,d)、DOUBLE(m,d)==REAL-4字节、8
定点数类型:DECIMAL(m,d)、NUMERIC-m+2字节、8
位类型:BIT(m)-1-8字节
各个类型的详细范围可以参考mysql文档
数据类型小例:
1 ......
MySQL 字符串截取函数:left(), right(), substring(), substring_index()。还有 mid(), substr()。其中,mid(), substr() 等价于 substring() 函数,substring() 的功能非常强大和灵活。
1. 字符串截取:left(str, length)
mysql> select left('sqlstudy.com', 3);+-------------------------+| left('sqlstudy.com', 3) | ......