且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

设置我的第一个数据库

更新时间:2023-02-09 21:50:53

在message-id< b3 ******************************** @ 4ax.com>中,

John写道:
In message-id <b3********************************@4ax.com>,
John wrote:
如果我想设置我的第一个数据库并开始在Dreamweaver中使用它我需要做什么?


你需要做的第一件事就是要明白Dreamweaver没有任何关于数据库的事情。

这本书我我正在制作一张带有数据库的CD。它告诉我把它放在驱动器C上的MySql文件夹中。


你明白为什么要告诉你这样做吗?
>
如果我写了一本书,据说是关于PHP编程的,并且告诉你

你需要做的第一件事就是打开开始菜单,然后点击
$ b在运行时$ b,然后键入''cmd'',然后键入''format c:''并回答''yes''

提示,你会这样做,因为它是这样说的这本书?


我不是说你的书是错的,只是从你的那一行开始询问我认为也许你在你真正做之前,你需要更多地了解你想要做的事情。

然而,当我在Dreamweaver中时,我点击应用程序侧面,
和添加MySql数据库的加号按钮。它告诉我输入
以下信息:

连接名称:conn_newland
MySQL服务器:localhost
用户名:root
密码:保留密码空白
数据库:newland_tours

如果我输入所有这些信息并点击测试就会出现错误1049
未知数据库。

这让我想知道是否我把
数据库放在正确的文件夹中?
If I want to set up my first database and start using it in
Dreamweaver what do I need to do?
first thing you need to do is to understand that dreamweaver has
nothing whatsoever to do with databases.
The book I''m working on has a CD with the database on. It is telling
me to put it in the MySql folder on drive C.
do you understand why it is telling you to do this?

if i wrote a book, supposedly about PHP programming, and told you that
the first thing you need to do is to open the Start menu, then click
on Run, then type ''cmd'' , then type ''format c:'' and answer ''yes'' to
the prompt, would you do it because it said so in the book?

i''m not saying your book is wrong, it''s just that from your line of
questioning i think that maybe you need to undestand a little bit more
about what you are trying to do before you actually do it.
However, when I''m in Dreamweaver I click on Applications at the side,
and the plus button to add a MySql database. It tells me to enter the
following info:

Connection Name: conn_newland
MySQL Server: localhost
Usename: root
Password: leave password blank
Database: newland_tours

If I enter all this info and click to test it comes up with error 1049
unknown database.

This makes me wonder whether I have put the
database in the correct folder?




我假设您正在使用Window



i''m presuming that you''re using Window





Window上的mysql数据库的默认位置
:

the default location for mysql databases on Window




X:\ [路径-to-mysql] \\\ dat


所以,如果安装了mysql,例如c:\ program program \ _mysql,那么

你的数据文件将在c:\program files \ mysql \ data>

1.找出你的mysql安装所在的位置(例如:\ program

files\mysql)


2.查看''数据'子目录(例如:\program files \mysql \ data) -

你应该看到名为''mysql''和''test''的子目录 - 这些是

你可以看到的数据库。 Dreamweaver。


3.在这里复制你的cd'数据文件


重新启动mysql(可能没有必要,不确定,不管怎么说都不会这样做

无论如何)

is
X:\[path-to-mysql]\data

so, if installed mysql to, for example, c:\program files\mysql, then
your data files will be in c:\program files\mysql\data

1. find out where your mysql installation lives (eg. :\program
files\mysql)

2. look in the ''data'' sub-directory (eg. :\program files\mysql\data) -
you should see sub-directories called ''mysql'' and ''test'' - these are
the databases you can see via. dreamweaver.

3. copy your cd''s data files here

re-start mysql (may not be necessary, not sure, won''t hut to do it
anyway)