PDA

View Full Version : Visual DB development with mySQL and yourSQL Client?


Moogs
2005-05-23, 19:47
I installed these this morning because it looked like yourSQL is supposed to be able to create databases visualyl (tables and all), but for some reason it doesn't work. Even though I have the latest stable version of mySQL and it's active, everything in the client interface is grayed out.

That is, all of the toolbar buttons for database creation (and menu items) are unavailable. All I can do is "Connect" but it's a chicken and egg thing. HowTF do I connect to something I haven't build yet?

torifile
2005-05-23, 20:12
Have you tried CocoaMySQL (http://cocoamysql.sourceforge.net)? Sounds like something similar and it works well.

Moogs
2005-05-23, 20:46
Nope but I'll give it a shot. I think there's some sort of behind-the-scenes compiling or something that I need to do in order for the client to enable all the database creation stuff, I just don't know what that thing is.

[Tried both now and it's the same thing. It wants me to connect to something when I don't have any existing database. Are there any GUI tools that allow you to create a SQL database from nothing? Are these just editing tools for existing DB?]

ast3r3x
2005-05-23, 21:37
You don't need a database to connect to your database software. I'll download it and see if I can get it to connect to my database software.

Edit: Maybe it doesn't work with 10.4? Don't seem to be able to get it to connect either.

Moogs
2005-05-23, 22:53
So it's actually a connection to the database server (the mySQL 4.1.12 install)? I guess my question is then:

What's the User Name, Password, Host name / IP, etc etc? I haven't created any account or anything like that so how do I "connect"? I am presented with these dialogs but I have none of the info. Are there "default" settings?

Try mySQL 4.1.12 and YourSQL 1.7.2 client. That should be all a person needs AFAICT to create mySQL databases (visually), but I'm obviously not doing something right so wtf do I know? :)

ast3r3x
2005-05-24, 05:09
YourSQL worked for me :D

Ok so here is the deal best to my memory. I just redid this with Tiger a bit ago, so hopefully this is mostly true...

Default...
''@'localhost' with no pass
''@'%' with no pass
'root'@'localhost' with no pass

I think there may be one more, but I am not positive of it.

In anycase, mysql.com (http://dev.mysql.com/doc/mysql/en/user-account-management.html) is decently documented about setting up the user accounts. You should keep in mind that you will want to get rid of the accounts with no password and probably no user because of security reasons.

Do you know how to work with MySQL in the terminal? If not you can go to entropy.ch (http://www.entropy.ch/software/macosx/mysql/) and read the installation instructions. Any problems or questions about commands needed once you are in mysql, just ask.

Moogs
2005-05-24, 07:04
Thanks ast3r3x. I'll give those a go. Probably I'll have more questions but it's a start. :)

[OK, I must be a retard because I'm still not doing something right. Here's the dialog fields I am presented with in YourSQL if I click "Connect" (which seems my only hope).

Server:

Port*:
Database*:
Char Set*:

User ID:
Password:

Items 2-4 are optional items it seems and are accessed by the pop-down widget next to Server. Which of the items you list above go where, because the variations I'm trying do nothing as far as activating the "New Database" widgets, etc.

ast3r3x
2005-05-24, 07:27
Sorry, have to ask...

What are you putting in those fields? I mean what are you putting for your server? Is it a database on a different server, or is it local? Have you gone and setup any accounts yet?

Not that it will help you at all yet, but mine looks like this...http://www.intouch04.com/files/db.png
I'm running it off of my computer which is why I put 'localhost' although I can also put 'albook.local' and it works.

Moogs
2005-05-24, 08:11
OK. Maybe I was asking the wrong question. Maybe I should be asking how to set up an account, because I have none as yet. No account, no database, no remote server.

All I'm trying to do is set my machine up so that I can visually start creating mySQL databases, and learn the technology a little bit.

That's why I was wondering if there's a "default" account, ID, password (generic IOW) that everyone uses when they're first starting up. Sort of like the equivalent of an untitled document in Photoshop that you later alter its settings and save it as something else.

Gotta go to work for now but I'll check back later. Thanks for your efforts on this. Hopefully I'll get the swing of it in short order. I downloaded myPHPAdmin also, which seems to me a localized web interface for this type of process, but it looks much more convoluted than just using a simple stand-alone GUI like YourSQL or CocoaMySQL (whatever it's called).

ast3r3x
2005-05-24, 09:02
*smacks forehead*

If you didn't install MySQL yet, go to entropy.ch (http://www.entropy.ch/software/macosx/mysql/) and follow these install instructions. (you can use a version newer than 4.0 like I believe he links you to)

After that, you should be able to connect to it using root and no password. Unless you changed it.

After that you can go into the mysql database (there can be multiple databases) and select the table (of course multiple tables) 'user' and then change passwords and accounts and all that from there.

I'd really recommend reading at least some of the MySQL Reference Manual (http://dev.mysql.com/doc/mysql/en/index.html) to learn how to do some things. Most notably which variable types you need to use.

Moogs
2005-05-24, 18:32
LOL.

Jesus am I bad at describing this. No, I absolutely HAVE installed mySQL 4.1.12 from the installer package version (i.e. no manual build version). My exact sequence of events was

1. Install mySQL
2. Install client
3. Attempt to use client
4. Scratch forehead and say "WTF, I don't have an ID or password so I can't connect"
5. Restarted because I thought it might make a difference
6. Repeat 3-4
7. Post here.

:D

ast3r3x
2005-05-24, 19:05
Here is what I did...

1)Installed the MySQL software.
2)Follow instructions at entropy.ch
3)Login as root to change user accounts
4)Run mysql client

5)read your post and be confused as anything until just recently

Try putting 'localhost' as the server. 'root' as the user id, and nothing as the password. If you haven't changed any user settings yet, I THINK this should work.

Again, I'd follow the post installation instructions at entropy.ch first.

Moogs
2005-05-24, 19:58
All right... I'll see what they say. I tried the localhost and root thing. No dice. Even though the PrefPanel says SQL is active, in YourSQL I get an error when I try to connect.

Moogs
2005-05-24, 20:51
Was reading through some of the mySQL forum posts there. Not real clear to me if Tiger is fully compatible with 4.1.12 or what the best method for a database knuckle-head like me is (Filemaker and Access are where my skills end pretty much).

This page seems to have some thorough setup instructions that I might try.
http://www.navicat.com/mac_detail.html

And this client looks like it could be worth the dough, but I'm not sure.
http://www.navicat.com/mac_detail.html

ast3r3x
2005-05-24, 21:05
Was reading through some of the mySQL forum posts there. Not real clear to me if Tiger is fully compatible with 4.1.12 or what the best method for a database knuckle-head like me is (Filemaker and Access are where my skills end pretty much).

This page seems to have some thorough setup instructions that I might try.
http://www.navicat.com/mac_detail.html

And this client looks like it could be worth the dough, but I'm not sure.
http://www.navicat.com/mac_detail.html

I'm on 4.1.11 with 10.4.1. :D NUMBERS!

ast3r3x
2005-05-24, 21:34
Moogs...try this.

server: swigg.net
uid = moogs
pwd = moogs

Moogs
2005-05-24, 23:48
will give it a go in the a.m. What is swigg.net btw?

ast3r3x
2005-05-25, 05:00
Domain I bought and never really did anything with. swig.com/.net were taken, so swigg.net :D

It just points to my computer at the moment, so hopefully it goes through the router alright and you can connect.

Moogs
2005-05-25, 07:04
Ah. :) Thanks for offering that as a means of testing. I'll giver a go. In general though, when using mySQL one can (and should, when developing) connect to your own instance of the mySQL server that is running on whichever Mac is being used, right?

ast3r3x
2005-05-25, 07:16
Ah. :) Thanks for offering that as a means of testing. I'll giver a go. In general though, when using mySQL one can (and should, when developing) connect to your own instance of the mySQL server that is running on whichever Mac is being used, right?

I don't really see that it matters. The only real advantage I see is a speed increase because nothing has to be transferred over the internet.

Gargoyle
2005-05-25, 07:23
Your mysql server could be anywhere that is connectable.

I have the latest version of both MySQL, Apache and PHP 5 running on my PB so I can develop my websites even without an internet connection. It makes it faster, but at the end of the day "localhost" is a special hostname that loops back into your computer. Technically there is no difference between that and www.google.com - they just point to different machines!

Moogs
2005-05-25, 23:06
Interesting. I think a book might be in order for this dealio. Can dive in after I finish my monster AppleScript book. :)