0

I'm trying to open mySql for learning purposes, but I'm a bit confused.
I found dozens of tutorials online, but none of them explains the basic stuff, instead - they explain the syntax of how to manipulate the information itself.
I'm not interested in that, for now.

I could really use some help with a couple of questions:
I found everywhere that the right way to open the mySql interpreter (is that what this is?) is running the following command from shell:

mysql database_name -h host -u username -p

where (and correct me if I'm wrong) 'mysql' is the interperter, 'database_name' is the data base I want to use, host is the name of the server that the database sits on, and the 'username' is the name of the user - the client.

  • First of all; what do the words "server" and "client" have to do here anyway? I'm not trying to connect anywhere.
  • Second, where exactly do the files themselves sit on my computer (meaning the path to the database-files itself), and how do I find it?
  • Is it possible to have several databases?
  • How come the command 'mysql' alone (without "database_name -h host -u username -p") also opens the interpreter for me?

Thank you in advanced.

so.very.tired
  • 2,958
  • 4
  • 41
  • 69

2 Answers2

2
Community
  • 1
  • 1
13ruce1337
  • 753
  • 1
  • 6
  • 13
2

What do the words "server" and "client" have to do here anyway? I'm not trying to connect anywhere.

  • SERVER is the name or IP of the computer on which mySQL is running
  • CLIENT is the name or IP of the computer which is calling the mySQL server they could be 1 in the same.

Second, where exactly do the files themselves sit on my computer (meaning the path to the database-files itself), and how do I find it?

  • Use the file located at C:\Program Files\MySQL\MySQL Server 5.1\my.ini (or whatever version your using) assuming windows.

Is it possible to have several databases?

How come the command 'mysql' alone (without "database_name -h host -u username -p") also opens the interpreter for me?

xQbert
  • 34,733
  • 2
  • 41
  • 62