发新话题
打印

PHPMYADMIN使用简单介绍

PHPMYADMIN使用简单介绍

一、安装
先装一个PHPMYADMIN在你的服务器上,如果你本来就有就不用装了。
最新的PHPMYADMIN你可以到:
http://www.sourceforge.net/projects/phpmyadmin/
下载。
修改里面的config.inc.php 文件(用文本编辑器)
MySQL hostname (一般是 'localhost', 也可能是比如db.myhost.com 或者一个IP 地址比如129.123.141.122)

MySQL database name

MySQL username

MySQL password

MySQL port number, if non-standard (your host will most likely provide this if it is non-standard)



你可以改为:
Hostname: db.myname.f2s.com

Database name: mydb

Username: 你的用户名

Password: 你的数据库密码

Port Num: 3306——————(一般不用填)

那么结果可能是这样的:
$cfgServers[1]['host'] = 'db.myname.f2s.com'; // MySQL hostname
$cfgServers[1]['port'] = '3306'; // MySQL port - leave blank for default port
$cfgServers[1]['adv_auth'] = false; // Use advanced authentication?
$cfgServers[1]['stduser'] = 'root'; // MySQL standard user (only needed with advanced auth)
$cfgServers[1]['stdpass'] = ''; // MySQL standard password (only needed with advanced auth)
$cfgServers[1]['user'] = '你的用户名'; // MySQL user (only needed with basic auth)
$cfgServers[1]['password'] = '你的密码'; // MySQL password (only needed with basic auth)
$cfgServers[1]['only_db'] = '你的数据库名'; // If set to a db-name, only this db is accessible
$cfgServers[1]['verbose'] = ''; // Verbose name for this host - leave blank to show the hostname

注意,每种服务器是不一样的。上传整个文件夹到你的服务器,
好了,运行PHPMYADMIN/INDEX.PHP3进行测试。


二使用。

选中左边树状目录里面你的数据库名。
点击后在右边出现你的数据库表,表下面有:


你可以在第一个图中的框里面运行你的SQL语句。
或者点浏览来运行你本机上的SQL文件。(这就是导入,但是注意一般不要超过5M,否则很麻烦,可能不能运行)


导出的话,就点最下面:
View dump (schema) of database
Structure only Add 'drop table'
Structure and data Send
Complete inserts


选中:Structure only 表示只导出结构

选择:Structure and data 表示结构和数据一起导出。

点SEND,那么就可以导出当前的库了。
当然你如果进入浏览数据表的页面,这里导出的就是单独的表。

好了,这是一般使用,过几天我再写个关于插入记录的。

TOP

发新话题