mysql 导入、导出数据库、表
mysql 导出表:
mysqldump -u 用户名 -p --opt 数据库用户名 表名
> 表名.sql
mysql 导出数据库:
mysqldump -u
用户名 -p --opt 数据库用户名
>
数据库
名.sql
mysql 导入表:
>source e:\base\pet.sql;
mysql 导入表数据:
>LOAD DATA LOCAL INFILE 'e:path/pet.txt' INTO TABLE pet
相关文档:
大部分服务器管理员知道MySQL数据库管理系统(RDBMS)是高度灵活的软件块,带有范围广阔的启动选项,可以用来修改相关行为。然而,大部分人却不
清楚,标准MySQL客户端带有同等大量的启动选项,其中一些在日常MySQL交互作用中极为有用。这些选项本身不是
“秘密”,而它们中很多未被使用,甚至其中一些可以显著 ......
how to install apache, PHP and MySQL on Linux
This tutorial explains the installation of Apache web server, bundled
with PHP and MySQL server on a Linux machine. The tutorial is primarily for SuSE
9.2, 9.3, 10.0 & 10.1, but most of the steps ought to be valid for all
Linux-like operating ......
一、安装
#
yum -y install mysql-server
二、配置
# vi /etc/my.cnf ← 编辑MySQL的配置文件
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility pack ......
我在登录MySQL后的命令行是这个样子的:
warmbupt@pchuang:/windows/MyCode/SS$ mysql -u root -ppassw0rd
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 37
Server version: 5.1.37-1ubuntu5.1 (Ubuntu)
Type 'help;' or '\h' for help. Type '\c' to clear the curr ......
现在大概列出如下:
1.数据库的设计
尽量把数据库设计的更小的占磁盘空间.
1).尽可能使用更小的整数类型.(mediumint就比int更合适).
2).尽可能的定义字段为not null,除非这个字段需要null.
3).如果没有用到变长字段的话比如varchar,那就采用固定大小的纪录格式比如char.
4).表的主索引应该尽可能的短.这样的话每条纪录 ......