默认安装目录: /usr/local/mysql windows 为C:\mysql. 包含了bin, scripts,data,docs, sql-bench等目录
其他目录有:
include (containing header files), lib (containing libraries used by MySQL), share (containing MySQL's error messages), and examples (only in Windows, containing examples of using the libmysql DLL). You may need to know where these directories are if you install other software (such as PHP) that links to MySQL, but you are unlikely to interact with them directly.
Bin目录有如下重要工具
mysqladmin: Used to perform many administrative functions.
myisamchk: Used to check and repair damaged MyISAM tables.
mysqldump: Used to back up your databases.
mysqlbinlog: Used to read the contents of the binary log, essential for disaster recovery.
mysqlshow: Used to get information about databases and tables.
scripts目录包含了脚本,比如mysqlhotcopy是个很有用的perl脚本,5.0已经在bin目录中.
用户接口有:
command-line interface mysql (also known as the MySQL monitor), MySQL Control Center (MySQLCC for short), and phpMyAdmin
其中MySQLCC已经改名
www.mysql.com/downloads/mysqlcc.html
www.mysql.com/products/mysqlcc/install.html
www.phpmyadmin.net/
mysql --i-am-a-dummy -u root不会对数据库进行改变
语句后面要使用分号,\g也是一样的结果
常用操作:
show databases;
use databasename;
show tables;
describe tablename;
\h
source filename
mysql -u username -p < filename