O'Reilly Forums: Getting Started With Mysql - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Getting Started With Mysql

#1 User is offline   SQL Rookie 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 20-April 09

Posted 20 April 2009 - 05:20 PM

I've done a lot of MS Access work and am now wanting to educate myself on SQL. I have successfully installed MySQL on my Mac OS 10.4 (following the instructions in Appendix ii of "Head First SQL"), but am having difficulty understanding what I need to do next. I AM NOT a 'techie'... more of a business analyst, so the terminology is giving me some trouble. Any assistance will be greatly appreciated. unsure.gif
0

#2 User is offline   jeffray j 

  • New Member
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 19-April 10

Posted 22 April 2010 - 03:22 AM

hi welcome to the sql world..the first steps i would suggest you is to learn how to
1)create a database,table
2)insert values into the table
3) select values.


a website i would suggest is w3schools.
or a head first my sql book would also help
0

#3 User is offline   AndrewSQLDBA 

  • Active Member
  • PipPip
  • Group: Members
  • Posts: 44
  • Joined: 27-December 09

Posted 24 May 2010 - 04:28 AM

MySQL has wonderful documentation, you should have installed that when you installed the product.

Database are highly technical, so you need to learn what the objects are called. There are two different sides to database servers. Development and Administration. You did not mention in your post what you actually want to learn. Both sides require that you know how to use the database, and how to write database code. MySQL is just about like Access, it does not require a server to handle the process control, you can run MySQL on a workstation level OS.

First I would suggest that you get a through understanding of how a database stores data. And how a database is configured and the layout of a database. What does what, so to speak. Then you can begin to learn how to properly design a database. There are some sample databases that come with MySQL, use them to get a little understanding. Then post questions on some of the more popular sites when you have a question or run into a problem. Learn what the syntax commands do, and what you can accomplish.

This is not something that is going to happen over nite. I have been working with databases, as an administrator, developer and an architect for over 25 years, and I am still learning.

Programming is problem solving. A database stores data, a database can also pump data in and out of itself. That is about all that is can do, that is its job, or lot in life.

you will gain experience and knowledge as you go, plan on making many mistakes, but learn from those mistakes and make yourself stronger.

Andrew SQLDBA
0

#4 User is offline   Billyy L 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 07-September 10

Posted 07 September 2010 - 07:22 PM

QUOTE (AndrewSQLDBA @ May 24 2010, 04:28 AM) <{POST_SNAPBACK}>
MySQL has wonderful documentation, you should have installed that when you installed the product.

Database are highly technical, so you need to learn what the objects are called. There are two different sides to database servers. Development and Administration. You did not mention in your post what you actually want to learn. Both sides require that you know how to use the database, and how to write database code. MySQL is just about like Access, it does not require a server to handle the process control, you can run MySQL on a workstation level OS.

First I would suggest that you get a through understanding of how a database stores data. And how a database is configured and the layout of a database. What does what, so to speak. Then you can begin to learn how to properly design a database. There are some sample databases that come with MySQL, use them to get a little understanding. Then post questions on some of the more popular sites when you have a question or run into a problem. Learn what the syntax commands do, and what you can accomplish.

This is not something that is going to happen over nite. I have been working with databases, as an administrator, developer and an architect for over 25 years, and I am still learning.

Programming is problem solving. A database stores data, a database can also pump data in and out of itself. That is about all that is can do, that is its job, or lot in life.

you will gain experience and knowledge as you go, plan on making many mistakes, but learn from those mistakes and make yourself stronger.

Andrew SQLDBA


Thanks you for the post.
_________________
watch movies online

This post has been edited by Billyy L: 07 September 2010 - 07:23 PM

0

#5 User is offline   hackertrang87 

  • New Member
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 21-September 10

Posted 21 September 2010 - 05:21 AM

Do you know nothing about getting started with MySQL but would just like to install and try it? Here's how, with occasional references and comparisons to the Pick/MV environments. No apologies, this info is entirely for Windows users. Once you're familiar with the Win32 implementation of MySQL, it should be easy to get familiar with the specifics of any other platform.

This article does not teach SQL, how to maintaintain databases or tables, or how to configure or maintain your server. That may be info for another article. It does start from the very beginning, starting and stopping the server, and getting access to the environment.
Why did I write this?

Because getting started with MySQL is very simple, but the documentation makes it sound so difficult. The docs talk about configuration files and switches and considerations for different platforms, and all sorts of things that don't apply to someone who just wants to see what this thing is about.

If you haven't installed MySQL yet, just download a binary install release from mysql.com and execute it on your PC using all of the defaults. It can't be much easier. This document assumes you've installed MySQL into the default c:\mysql directory. If not, there are a couple configuration settings that need to be changed. I'll skip that info - it's is covered in almost every Installing MySQL guide and ReadMe doc available. See your C:\mysql\Docs directory for a manual if you need more help just getting the software installed. I don't like to install anything in my root directory, but in this case it's better to get installed, figure things out and re-install later, rather than to spend all of your time messing with configuration specs and never getting to use the software.

So assuming at this point that everything is installed...

Under c:\mysql you'll see directory \bin. That has the executables to bring the database server up and down, as well as many other functions. Open a DOS prompt to that bin directory.

Like a Pick virtual machine, the MySQL server must be started so that it can be accessed by clients. To test the theory, let's look at a DOS-based client, "mysql.exe". This is just a DOS interface to the server, it's not "MySQL itself". At the command prompt, type "mysql" and press enter.

You may see this:
ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)
Or you may see this:
Welcome to the MySQL monitor....

If you get a Welcome, the server is up and you will get the "mysql>" client prompt. Use 'quit' to get out at any time.

Another way to see if the server is up or down is to use the command:
mysqladmin ping
This will either tell you it can't connect to localhost, or it will say "mysqld is alive".

The program mysqld.exe is the server process. Note the "D" meaning Daemon - just another word for Server. Other executables are mysqld-max and mysqld-nt. Each one of these executables support different functions. Configuration "mysqld-nt" is the one we'll see by default, supporting the most options.

The server can be started in the foreground or the background. Foreground just ties up a DOS screen so we'll look at the background options. The install process creates a Windows Service which may be set to start automatically after a reboot. That service just executes "mysqld-nt.exe" You can start the service manually using:
net start mysql

To shutdown the server from the command line, use:
net stop mysql
Or use mysqladmin again:
mysqladmin shutdown
The server can also be shutdown using the normal Services Management Console in Windows.

For GUI tools, one that comes with the standard download is WinMySqlAdmin.exe, also in the bin directory. Clicking on this file in Windows Explorer executes the GUI. As soon as it starts, it minimizes itself to the task bar - don't execute it more than once! If MySQL isn't up when the GUI is started, the service is started. If you look in the task bar, you'll see a red, yellow, green stoplight. Green means the server is up, red means down, yellow means it's in transition. Terminating this admin program does not shutdown the server. You can right click on the icon and click ShowMe to actually see the GUI, and you will see options to start/stop the server here as well.

For easy access, I've created icons on my desktop for "net start", "net stop", admin, control center, and MySQL-front - no DOS prompts necessary.

OK, we can start and stop the server. How about actually using MySQL? The Admin program is not for using the environment really, just for monitoring status. There are many popular GUIs for this database, people even use Excel and MS Access as clients. Of the free clients, a couple are popular for Windows. MySQL-Front is very popular but some people say it's no longer maintained. The web site seems to indicate otherwise. You can download MySQL Control Center (MySQLCC). This isn't a full-featured GUI yet, it's a little buggy, but it is a 0.9 beta in development. It's free for now but that might not be permanent. (Note that MySQLCC also replaces MySQL GUI - don't get too enamored with your tools, they tend to come and go.) A combination of these tools should help to get started using the environment. As you start to use the GUIs you'll see their limitations. Some don't display data nicely, others don't let you easily save your SQL queries for future reference, etc. Search the net for more GUI options, some will be free and others will cost something.

What do you do inside the GUI? This is where we need to understand SQL and the relational world. There are MANY similarities between that world and the Pick world, it's mostly a matter of understanding the syntax, not the concepts. Maybe one of these days I'll do an article on that... In the mean time, there are a number of good books that specialize in MySQL for beginners and advanced usage, and there are a ton of similar web sites.

Good luck!




import export distributors
affiliate marketing
0

#6 User is offline   LianaB4 

  • New Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 03-November 11

Posted 03 November 2011 - 08:32 PM

HI there
I just started reading Head First SQL and I'm up to page 23 where I start creating my own table. It has all been pretty straight forward and easy to learn so far. The installation was a bit annoying as MySQL.com has changed their installation process since my book was made. My mum found this book at a library drive but its 3 years old! This brings me to my problem. I can't work out where to start typing my script. I opened SQL EDITOR and started writing in the "Query 1" box, but when I wrote DESC my_contacts nothing happened.I also opened the "Scripting Shell" which looked more like what was in the text book but again, I think I'm doing something wrong. nothing happened. And I only have a one line box in which to write in. I just installed the "everything package" as they no longer have a "Typical Setup" option and I have no idea where to start. The book is awesome, just my copy is a little out of date.

Attached thumbnail(s)

  • Attached Image: SQLProbs1.jpg
  • Attached Image: SQLProbs2.jpg

This post has been edited by LianaB4: 03 November 2011 - 08:33 PM

0

#7 User is offline   LianaB4 

  • New Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 03-November 11

Posted 03 November 2011 - 09:04 PM

Hey there...again.
So I quit SQL workbench and started the thing again and MySQL Monitor has popped up. I can type in it and everything! I have never seen it before sooo... cool. Definitely looks more like the book. I have no idea where Workbench has gone to. I tried searching for the thing in my computer. Computer says no. Ahh well... I maintain everything on Workbench was way beyond my SQL skill at this present moment. Perhaps its for the best. Though the thought of it lurking in my computer somewhere may haunt me forever.

This post has been edited by LianaB4: 03 November 2011 - 09:04 PM

0

#8 User is offline   zacksyah 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 07-December 11

Posted 07 December 2011 - 07:13 PM

How MySQL it works?
how if we input query, and we get the result from query?
please explain in detail. Thanks in advice
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users