MySQL新手,我很困惑! [英] New to MySQL and I'm confused!

查看:68
本文介绍了MySQL新手,我很困惑!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Access用户,我正在尝试学习MySQL,然后学习PHP,这样我就可以在某些网络数据库中创建

。但它只是没有点击。


我已经按照一些教程,拿了一本书,但只是到了

square one has一直很痛苦。我可以按照教程进行操作,直到我可以制作桌子和东西的
,但我不知道我是怎么到那里的,或者是什么

要做的如果有什么变化使它与教程不同。


MySQL似乎与我用过的任何其他程序不同。通常,我可以

安装一个程序,然后在我的桌面上有一个小图标,我点击

它,并且有程序。


但是使用MySQL,我安装它,它开始作为服务运行,但是我还是看不到它。所以我必须使用命令提示符与它交谈。但是

执行此操作的命令不是直观的,而且我看到的教程(来自DevShed,官方网站和其他几个)这个

部分就像我已经应该知道它是如何工作的。有时候,我可以上班,但有时我不能。用户,密码,端口,这是我自己的电脑上的
。我甚至不想在

网络或互联网上想到这是什么样的。或试图让一个程序与它交谈

自动。


是否有一个关于我应该如何实际<的机制的良好入门br />
这个程序的界面?我可以跳过整个命令行的事情吗?

只是获得一个GUI?我想我仍然需要知道用GUI连接和用b
的东西。

I''m an Access user, and I''m trying to learn MySQL and then PHP so I can make
some web databases. But it just isn''t clicking.

I''ve followed some tutorials, and picked up a book, but just getting to
square one has been a pain. I can follow the tutorials and get to the point
where I can make tables and stuff, but I don''t know how I got there, or what
to do if something changes that makes it different than the tutorial.

MySQL doesn''t seem to be like any other program I''ve used. Usually, I can
install a program, and then there''s a little icon on my desktop, I click on
it, and there is the program.

But with MySQL, I install it, and it starts running as a service, but I
still can''t see it. So I have to use a command prompt to talk to it. But
the commands to do this are anything but intuitive, and the tutorials I''ve
seen (from DevShed, the official site, and a few others) gloss over this
part like I''m already supposed to know how it works. Sometimes, I can get
it to work, and sometimes I can''t. Users, passwords, ports, And this is
on my own computer. I don''t even want to think of what this is like on a
network, or the internet. Or trying to get a program to talk to it
automatically.

Is there a good primer on the mechanics of how I''m supposed to actually
interface with this program? Can I skip the whole command-line thing and
just get a GUI? I imagine I''ll still need to know about connecting and
stuff with a GUI.

推荐答案

w_curtis写道:
w_curtis wrote:
我是一名Access用户,我正在尝试学习MySQL,然后是PHP,这样我就可以制作一些网络数据库了。但它只是没有点击。
I''m an Access user, and I''m trying to learn MySQL and then PHP so I can make
some web databases. But it just isn''t clicking.




这是真的,这是因为MySQL是一个真正的数据库,而Access

是只是一个玩具(看起来不错,但你不能用它做很多有用的东西)

恕我直言。


数据库服务器的主要用途是成为一个服务器。然后你可以找到你喜欢与之交互的UI或GUI。有两个控制台

和MySQL的图形插件,但我更喜欢mysql控制台程序。


如果你知道SQL,它很容易与控制台交互程序,

但如果没有,你应该学习它,如果你打算做数据库

软件。你应该学习它,因为在不了解SQL的情况下,很难做出快速有效的查询,这是

网页编程所必需的。


#启动控制台程序:

#(假设你在C:\ Myy \中安装了mysql)

#(假设你有还没设置root密码)

#(如果你有root密码使用:mysql -u root -p)


C:\> cd c:\ mysql \ bin \

c:\ mysql \ bin> mysql -u root

欢迎使用MySQL监视器。命令以;结尾;或者\ g。

您的MySQL连接ID为129到服务器版本:3.23.49-log


键入''help;''或'' \h''寻求帮助。输入''\ c''清除缓冲区。


mysql>


#当你看到这个,你在mysql控制台你可以

#例如创建一个数据库,选择数据库,在那里创建表

#将数据插入表中,并选择数据,

#最后我们将删除数据库,这将破坏表,插入数据和数据库的
#。当然如果你是#b $ b#为现实生活做点什么,你不需要丢弃数据库,

#它只是删除我们的测试数据库。小心不要用这个命令来删除mysql数据库:


mysql> create database mydatabasename;

查询OK,1行受影响(0.01秒)

mysql>使用mydatabasename;

数据库已更改


mysql> create table mytablename(id int unsigned,name varchar(255));

查询OK,0行受影响(0.00秒)

mysql>插入mytablename值(1,''Jack'');

查询OK,1行受影响(0.00秒)

mysql>插入mytablename值(2,''Lisa'');

查询OK,1行受影响(0.00秒)

mysql> select * from mytablename;

+ ------ + ------ +

| id |姓名|

+ ------ + ------ +

| 1 |杰克|

| 2 | Lisa |

+ ------ + ------ +

2行套装(0.01秒)


mysql> drop database mydatabasename;

查询OK,3行受影响(0.00秒)


如果你没有做到这一切,请告诉我们失败的地方,我们请问

看看我们是否可以解决这个问题。


GUI程序是什么,我不太了解它们,因为我不知道t

使用它们。然而,其他人可能会回答这个问题,或者你可以尝试用Google搜索答案。



That is true, and it is because MySQL is a real database, while Access
is just a toy (looks nice, but you can''t do much usefull stuff with it)
IMHO.

The main purpose of a database server is to be a server. Then you can
find the UI or GUI you like to interact with it. There are both console
and graphical intercases for MySQL, but I prefer mysql console program.

If you know SQL it is quite easy to interact with the console program,
but if not, you should learn it, if you are going to do database
software. You should learn it, because without understanding SQL it is
very hard to make fast and efficient queries, which are required in
web-programming.

# To start the console program:
# ( Assuming you have mysql installed in C:\MySQL\ )
# ( Assuming you have not set up the root password yet )
# ( If you have root password use: mysql -u root -p )

C:\> cd c:\mysql\bin\
c:\mysql\bin> mysql -u root

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 129 to server version: 3.23.49-log

Type ''help;'' or ''\h'' for help. Type ''\c'' to clear the buffer.

mysql>

# When you see this, you are in mysql console and you can
# for example create a database, select database, create table there
# insert data into table, and select the data,
# and finally we will drop the database, which will destroy
# the tables, inserted data and database. Of course if you are
# doing something for real life, you don''t need to drop database,
# it is just to remove our test-database. Be carefull not to
# drop mysql database with this command.:

mysql> create database mydatabasename;
Query OK, 1 row affected (0.01 sec)

mysql> use mydatabasename;
Database changed

mysql> create table mytablename( id int unsigned, name varchar(255) );
Query OK, 0 rows affected (0.00 sec)

mysql> insert into mytablename values( 1, ''Jack'' );
Query OK, 1 row affected (0.00 sec)

mysql> insert into mytablename values( 2, ''Lisa'' );
Query OK, 1 row affected (0.00 sec)

mysql> select * from mytablename;
+------+------+
| id | name |
+------+------+
| 1 | Jack |
| 2 | Lisa |
+------+------+
2 rows in set (0.01 sec)

mysql> drop database mydatabasename;
Query OK, 3 rows affected (0.00 sec)

If you fail to do all that, please tell us where it fails and we will
see if we can fix that problem.

What comes to GUI programs, I don''t know much about them, since I don''t
use them. However someone else might answer to that question, or you
could try searching the answer for example with Google.


w_curtis写道:
w_curtis wrote:
我是Access用户,我正在尝试学习MySQL,然后学习PHP,这样我就可以创建一些Web数据库。但它只是没有点击。
I''m an Access user, and I''m trying to learn MySQL and then PHP so I can make
some web databases. But it just isn''t clicking.




这是真的,这是因为MySQL是一个真正的数据库,而Access

是只是一个玩具(看起来不错,但你不能用它做很多有用的东西)

恕我直言。


数据库服务器的主要用途是成为一个服务器。然后你可以找到你喜欢与之交互的UI或GUI。有两个控制台

和MySQL的图形插件,但我更喜欢mysql控制台程序。


如果你知道SQL,它很容易与控制台交互程序,

但如果没有,你应该学习它,如果你打算做数据库

软件。你应该学习它,因为在不了解SQL的情况下,很难做出快速有效的查询,这是

网页编程所必需的。


#启动控制台程序:

#(假设你在C:\ Myy \中安装了mysql)

#(假设你有还没设置root密码)

#(如果你有root密码使用:mysql -u root -p)


C:\> cd c:\ mysql \ bin \

c:\ mysql \ bin> mysql -u root

欢迎使用MySQL监视器。命令以;结尾;或者\ g。

您的MySQL连接ID为129到服务器版本:3.23.49-log


键入''help;''或'' \h''寻求帮助。输入''\ c''清除缓冲区。


mysql>


#当你看到这个,你在mysql控制台你可以

#例如创建一个数据库,选择数据库,在那里创建表

#将数据插入表中,并选择数据,

#最后我们将删除数据库,这将破坏表,插入数据和数据库的
#。当然如果你是#b $ b#为现实生活做点什么,你不需要丢弃数据库,

#它只是删除我们的测试数据库。小心不要用这个命令来删除mysql数据库:


mysql> create database mydatabasename;

查询OK,1行受影响(0.01秒)

mysql>使用mydatabasename;

数据库已更改


mysql> create table mytablename(id int unsigned,name varchar(255));

查询OK,0行受影响(0.00秒)

mysql>插入mytablename值(1,''Jack'');

查询OK,1行受影响(0.00秒)

mysql>插入mytablename值(2,''Lisa'');

查询OK,1行受影响(0.00秒)

mysql> select * from mytablename;

+ ------ + ------ +

| id |姓名|

+ ------ + ------ +

| 1 |杰克|

| 2 | Lisa |

+ ------ + ------ +

2行套装(0.01秒)


mysql> drop database mydatabasename;

查询OK,3行受影响(0.00秒)


如果你没有做到这一切,请告诉我们失败的地方,我们请问

看看我们是否可以解决这个问题。


GUI程序是什么,我不太了解它们,因为我不知道t

使用它们。然而,其他人可能会回答这个问题,或者你可以尝试用Google搜索答案。



That is true, and it is because MySQL is a real database, while Access
is just a toy (looks nice, but you can''t do much usefull stuff with it)
IMHO.

The main purpose of a database server is to be a server. Then you can
find the UI or GUI you like to interact with it. There are both console
and graphical intercases for MySQL, but I prefer mysql console program.

If you know SQL it is quite easy to interact with the console program,
but if not, you should learn it, if you are going to do database
software. You should learn it, because without understanding SQL it is
very hard to make fast and efficient queries, which are required in
web-programming.

# To start the console program:
# ( Assuming you have mysql installed in C:\MySQL\ )
# ( Assuming you have not set up the root password yet )
# ( If you have root password use: mysql -u root -p )

C:\> cd c:\mysql\bin\
c:\mysql\bin> mysql -u root

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 129 to server version: 3.23.49-log

Type ''help;'' or ''\h'' for help. Type ''\c'' to clear the buffer.

mysql>

# When you see this, you are in mysql console and you can
# for example create a database, select database, create table there
# insert data into table, and select the data,
# and finally we will drop the database, which will destroy
# the tables, inserted data and database. Of course if you are
# doing something for real life, you don''t need to drop database,
# it is just to remove our test-database. Be carefull not to
# drop mysql database with this command.:

mysql> create database mydatabasename;
Query OK, 1 row affected (0.01 sec)

mysql> use mydatabasename;
Database changed

mysql> create table mytablename( id int unsigned, name varchar(255) );
Query OK, 0 rows affected (0.00 sec)

mysql> insert into mytablename values( 1, ''Jack'' );
Query OK, 1 row affected (0.00 sec)

mysql> insert into mytablename values( 2, ''Lisa'' );
Query OK, 1 row affected (0.00 sec)

mysql> select * from mytablename;
+------+------+
| id | name |
+------+------+
| 1 | Jack |
| 2 | Lisa |
+------+------+
2 rows in set (0.01 sec)

mysql> drop database mydatabasename;
Query OK, 3 rows affected (0.00 sec)

If you fail to do all that, please tell us where it fails and we will
see if we can fix that problem.

What comes to GUI programs, I don''t know much about them, since I don''t
use them. However someone else might answer to that question, or you
could try searching the answer for example with Google.


w_curtis写道:
w_curtis wrote:
我是Access用户,我正在尝试学习MySQL,然后学习PHP,这样我就可以创建一些Web数据库。但它只是没有点击。
I''m an Access user, and I''m trying to learn MySQL and then PHP so I can make
some web databases. But it just isn''t clicking.




这是真的,这是因为MySQL是一个真正的数据库,而Access

是只是一个玩具(看起来不错,但你不能用它做很多有用的东西)

恕我直言。


数据库服务器的主要用途是成为一个服务器。然后你可以找到你喜欢与之交互的UI或GUI。有两个控制台

和MySQL的图形插件,但我更喜欢mysql控制台程序。


如果你知道SQL,它很容易与控制台交互程序,

但如果没有,你应该学习它,如果你打算做数据库

软件。你应该学习它,因为在不了解SQL的情况下,很难做出快速有效的查询,这是

网页编程所必需的。


#启动控制台程序:

#(假设你在C:\ Myy \中安装了mysql)

#(假设你有还没设置root密码)

#(如果你有root密码使用:mysql -u root -p)


C:\> cd c:\ mysql \ bin \

c:\ mysql \ bin> mysql -u root

欢迎使用MySQL监视器。命令以;结尾;或者\ g。

您的MySQL连接ID为129到服务器版本:3.23.49-log


键入''help;''或'' \h''寻求帮助。输入''\ c''清除缓冲区。


mysql>


#当你看到这个,你在mysql控制台你可以

#例如创建一个数据库,选择数据库,在那里创建表

#将数据插入表中,并选择数据,

#最后我们将删除数据库,这将破坏表,插入数据和数据库的
#。当然如果你是#b $ b#为现实生活做点什么,你不需要丢弃数据库,

#它只是删除我们的测试数据库。小心不要用这个命令来删除mysql数据库:


mysql> create database mydatabasename;

查询OK,1行受影响(0.01秒)

mysql>使用mydatabasename;

数据库已更改


mysql> create table mytablename(id int unsigned,name varchar(255));

查询OK,0行受影响(0.00秒)

mysql>插入mytablename值(1,''Jack'');

查询OK,1行受影响(0.00秒)

mysql>插入mytablename值(2,''Lisa'');

查询OK,1行受影响(0.00秒)

mysql> select * from mytablename;

+ ------ + ------ +

| id |姓名|

+ ------ + ------ +

| 1 |杰克|

| 2 | Lisa |

+ ------ + ------ +

2行套装(0.01秒)


mysql> drop database mydatabasename;

查询OK,3行受影响(0.00秒)


如果你没有做到这一切,请告诉我们失败的地方,我们请问

看看我们是否可以解决这个问题。


GUI程序是什么,我不太了解它们,因为我不知道t

使用它们。然而,其他人可能会回答这个问题,或者你可以尝试用Google搜索答案。



That is true, and it is because MySQL is a real database, while Access
is just a toy (looks nice, but you can''t do much usefull stuff with it)
IMHO.

The main purpose of a database server is to be a server. Then you can
find the UI or GUI you like to interact with it. There are both console
and graphical intercases for MySQL, but I prefer mysql console program.

If you know SQL it is quite easy to interact with the console program,
but if not, you should learn it, if you are going to do database
software. You should learn it, because without understanding SQL it is
very hard to make fast and efficient queries, which are required in
web-programming.

# To start the console program:
# ( Assuming you have mysql installed in C:\MySQL\ )
# ( Assuming you have not set up the root password yet )
# ( If you have root password use: mysql -u root -p )

C:\> cd c:\mysql\bin\
c:\mysql\bin> mysql -u root

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 129 to server version: 3.23.49-log

Type ''help;'' or ''\h'' for help. Type ''\c'' to clear the buffer.

mysql>

# When you see this, you are in mysql console and you can
# for example create a database, select database, create table there
# insert data into table, and select the data,
# and finally we will drop the database, which will destroy
# the tables, inserted data and database. Of course if you are
# doing something for real life, you don''t need to drop database,
# it is just to remove our test-database. Be carefull not to
# drop mysql database with this command.:

mysql> create database mydatabasename;
Query OK, 1 row affected (0.01 sec)

mysql> use mydatabasename;
Database changed

mysql> create table mytablename( id int unsigned, name varchar(255) );
Query OK, 0 rows affected (0.00 sec)

mysql> insert into mytablename values( 1, ''Jack'' );
Query OK, 1 row affected (0.00 sec)

mysql> insert into mytablename values( 2, ''Lisa'' );
Query OK, 1 row affected (0.00 sec)

mysql> select * from mytablename;
+------+------+
| id | name |
+------+------+
| 1 | Jack |
| 2 | Lisa |
+------+------+
2 rows in set (0.01 sec)

mysql> drop database mydatabasename;
Query OK, 3 rows affected (0.00 sec)

If you fail to do all that, please tell us where it fails and we will
see if we can fix that problem.

What comes to GUI programs, I don''t know much about them, since I don''t
use them. However someone else might answer to that question, or you
could try searching the answer for example with Google.


这篇关于MySQL新手,我很困惑!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆