Madagawho? MySQL pre-newbie help

Joined
Jan 7, 2008
Messages
133
Reaction score
4
Points
18
Location
Brazil
Your Mac's Specs
mid'09 MBP; 2.53GHz; 8GB RAM; OS X 10.8.2 | 2G iPod Touch 32GB | iPhone 5 iOS 7.1 16GB | iPad Air
i'm so confused i don't even know if i'm posting this in the right forum, but:

this semester at college i must start working with MySQL. i'm always eager to learn, but this is kinda scary.
i've kept my windows desktop, but i really want to take this switch seriously and start using my macbook for programming and developing from now on (i really feel like i'm not exploring the possibilities so far).

so, i'm reading a lot on the subject online, and installing MySQL seems to be my biggest problem so far... i don't even know which version to choose!
:Confused:

do i install the regular package or tar packages?
x86 or x86_64? (i don't even know what this means!)

oh, i'm running leopard.

thanks
 
Joined
Mar 7, 2008
Messages
10
Reaction score
0
Points
1
Grab the regular package - it's a .dmg file so it's hard to go wrong; you'll want the x86 version, unless your computer is an X-Serve or the Mac Pro (which it isn't).

Edit: However, you're going to have to get used to working with .tar files sooner or later...could be a good time to start. To get some more info on how tar works, open up a terminal and type 'man tar' without the quotes. Heh, "man tar."
 
Joined
Jun 25, 2005
Messages
3,231
Reaction score
112
Points
63
Location
On the road
Your Mac's Specs
2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
What are you taking in college?

If you are taking computer science/systems courses, then as scoff said you'll have to learn about .tar files, as well as .zip, .gzp, and perhaps a couple of others. Web search engines are powerfull friends here. Also learn how to use the man pages via the Terminal. Type man man. Oh, and of course the Terminal shell alternatives.

Before installing MySQL, find and read the generic install instructions. It will describe what you have to do to set up a user account and reset the main username and password.
 
OP
MissMurder
Joined
Jan 7, 2008
Messages
133
Reaction score
4
Points
18
Location
Brazil
Your Mac's Specs
mid'09 MBP; 2.53GHz; 8GB RAM; OS X 10.8.2 | 2G iPod Touch 32GB | iPhone 5 iOS 7.1 16GB | iPad Air
i'm taking webdesign & programming, but the material they provide us is really weak and incomplete, so i'm trying to do things myself.
problem is, i have never touched these things before.

ok, so i typed 'man man' on the terminal, saw some instructions, felt dizzy. ;)
what shell alternatives?
i guess i'll have to read more about terminal before asking questions...
thanks again!
 
Joined
Jun 25, 2005
Messages
3,231
Reaction score
112
Points
63
Location
On the road
Your Mac's Specs
2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
Yea, the man pages can be dizzying. You'll get more familiar with it over time.

I probably shouldn't have mentioned shell alternatives. These are the different command line environments that exist in Unix land. Bash is the default with OS X now, but sh, csh, tcsh, korn, and bourne are others. Really what you need to be aware of is that they can act differently when you don't expect it. Over time this is something you likely will need to know. Many years ago I choose tcsh and use it today because that is what I'm used to.

Realize that you don't have to know it all. Like most people you'll build up knowledge over time. That knowledge and experience will help with new tasks. It is a productive cycle that just takes time.
 
OP
MissMurder
Joined
Jan 7, 2008
Messages
133
Reaction score
4
Points
18
Location
Brazil
Your Mac's Specs
mid'09 MBP; 2.53GHz; 8GB RAM; OS X 10.8.2 | 2G iPod Touch 32GB | iPhone 5 iOS 7.1 16GB | iPad Air
phew!

ok, what i know so far:
- the shell i'm using is bash;
- mysql is running (i can see that on system preferences, where there's a new panel for mysql);
- i tried setting up a password using the following commands:


/usr/local/mysql/bin/mysqladmin -u root password <password>
/usr/local/mysql/bin/mysqladmin -u root -h `hostname` password <password>

(which i took from the mysql developer zone website)

but i had no idea what to do next, so i don't know if it worked. actually, the main problem i'm having right now is not knowing what's working or not, not knowing how to check if the things i've done are right.

and since i'm probably the only one in the course that's not running windows, i'm at the mercy of you guys.

what i found online (both in portuguese and english) are tutorials and such that suppose i already know the commands, which i clearly don't. also, i can't seem to find anything that talks about mysql alone, it's all about installing mysql, php, .net and more.
i wrote to someone who runs a blog in portuguese about programming on mac os x and he basically wrote me back saying i was being lazy. :|
 
Joined
Jun 25, 2005
Messages
3,231
Reaction score
112
Points
63
Location
On the road
Your Mac's Specs
2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
The starting MySQL page is probably http://dev.mysql.com/usingmysql/get_started.html and the Mac one is http://dev.mysql.com/doc/refman/5.0/en/mac-os-x-installation.html which has some interesting notes. You'll want to set your PATH for your shell. That is answered there. That will allow you to enter just the commands rather than whole paths to a command.

To see if you can get into mysql, at the terminal prompt type;
/usr/local/mysql/bin/mysql -u root -p​
You should be prompted for the root password you created. Enter that then you should see a welcome message and a 'mysql>' prompt.

If you got the prompt, then type;
show databases;​
I beleive you'll see two, as you haven't yet created one for your project.

It isn't normal to control a database via a root password. The norm is to create a database and add a super user that controls that particular database. That user also is the one to add other users and permissions. You'll learn this as you go. I just thought I'd plant the basic thought now.

I'd recommend you by a book on MySQL. There are so many to choose from. Perhaps one that also includes a programming language you are using would be best. Read title reviews at Amazon.
 
OP
MissMurder
Joined
Jan 7, 2008
Messages
133
Reaction score
4
Points
18
Location
Brazil
Your Mac's Specs
mid'09 MBP; 2.53GHz; 8GB RAM; OS X 10.8.2 | 2G iPod Touch 32GB | iPhone 5 iOS 7.1 16GB | iPad Air
well, as i suspected, the root password wasn't created after the commands i typed, because i didn't know what to do afterwards and the only comand i know is 'quit', so i quit.

now i can't even find the page from where i took the commands on the mysql website, and as much as i would like to buy books on the subject (and i probably will) by the time they get here, this subject will be over, as it's only a 4-credit class (aprox. 8 weeks -- we're already reaching the end of the 3rd week).

thanks a lot for your help :)
 
Joined
Jun 25, 2005
Messages
3,231
Reaction score
112
Points
63
Location
On the road
Your Mac's Specs
2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
You need to be more proactive. We can't be giving you all the answers. You are in a learning process that requires an investment of your time.

Read the ENTIRE contents of each of the below links. Keep in mind you may have to prefix the mysqladmin command with sudo and give your OS X privileged password.

General Security Guidelines leads to Securing the Initial MySQL Accounts

Oh. Those for the 5.0.x MySQL. The 4.x docs may be a little different.
 
OP
MissMurder
Joined
Jan 7, 2008
Messages
133
Reaction score
4
Points
18
Location
Brazil
Your Mac's Specs
mid'09 MBP; 2.53GHz; 8GB RAM; OS X 10.8.2 | 2G iPod Touch 32GB | iPhone 5 iOS 7.1 16GB | iPad Air

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top