Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jrmy

macrumors newbie
Original poster
Nov 7, 2007
5
0
Denver, CO
Hi,

I've been at this for a week and I have to admidt that I'm lost on how to get MySQL up and running on my Mac (10.3.9). I downloaded and installed MySQL. I did find "mysql" and "mysql-5.0.45-osx10.3-powerpc" in my
/usr/local folder using the Terminal.

But in following all the info I gathered on the internet, I get nowhere. I get lots of "command not found" and things like that, and the prompt on Terminal did not change from my user name to MYSQL. How do I make sure that MySQL is installed correctly and how do I access it?

I've used MySQL through a GUI site, but I'm trying to learn how to run this myself but its driving my nuts...

Any help?

Thanks!
Jeremy
 

jrmy

macrumors newbie
Original poster
Nov 7, 2007
5
0
Denver, CO
Thanks for the link...

I followed the directions up to step 5 ("To start the server, issue sudo echo first, then type sudo ./bin/mysqld_safe &")

This is what I get in return:

"A mysqld process already exists"

Does that mean in my previous experiments before I wrote to this forum, that I may have started up MySQL? This is where I've gotten stuck before.

Any suggestions?
 

Zortrium

macrumors 6502
Jun 23, 2003
461
0
Yes, that probably means you've already gotten MySQL running - try running "find /usr -name mysql" to find where it's been installed, then try step #6 from the above link (using whatever path turns up for where MySQL was already installed).
 

jrmy

macrumors newbie
Original poster
Nov 7, 2007
5
0
Denver, CO
Thanks alot for you help so far, Zotrium,

The result of "find /usr -name mysql" yielded:

/usr/local/mysql
/usr/local/mysql-5.0.45-osx10.3-powerpc/bin/mysql
find: /usr/local/mysql-5.0.45-osx10.3-powerpc/data: Permission denied
/usr/local/mysql-5.0.45-osx10.3-powerpc/share/mysql


so I used that first line for line 6, like so:

/usr/local/mysql-5.0.45-osx10.3-powerpc/bin/mysqltest

And this is what I got:
"mysqltest: Could not open connection 'default': 1045 Access denied for user 'jrmy'@'localhost' (using password: NO)
not ok"

That "1045 access denied" and "not ok" seem like bad things. I wonder if I screwed things up when I tried to set this up last weekend. Does it look like the alias isn't pointing to the right spot?

Jeremy
 

Zortrium

macrumors 6502
Jun 23, 2003
461
0
Assuming that you haven't changed any of the MySQL users, the only MySQL user that currently exists is the root user - your first order of business should be to change the root password, as such:

/usr/local/mysql-5.0.45-osx10.3-powerpc/bin/mysqladmin -u root password <<new_password_here>>

If it asks you for the existing mysql root password, it's blank (so just hit enter), again assuming that you didn't already change the root password. After you've done that, you can open up a MySQL command-line connection with:

/usr/local/mysql-5.0.45-osx10.3-powerpc/bin/mysql -u root -p

(then enter the new root password when prompted).

You'll ultimately want to create non-root accounts to actually use for whatever you're doing.
 

jrmy

macrumors newbie
Original poster
Nov 7, 2007
5
0
Denver, CO
I feel like I'm getting closer to getting this working... BUT, this is what happened when I entered "/usr/local/mysql/bin/mysql -u root -p"

Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

I enetered my computer admin password. I don't know of any mysql password that I may have set up. Is this telling me that I created a password for mysql and I am entering it incorrectly? If that is the case, how do I reset that?

Thanks,

Jeremy
 

Phil A.

Moderator emeritus
Apr 2, 2006
5,799
3,094
Shropshire, UK
I feel like I'm getting closer to getting this working... BUT, this is what happened when I entered "/usr/local/mysql/bin/mysql -u root -p"

Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

I enetered my computer admin password. I don't know of any mysql password that I may have set up. Is this telling me that I created a password for mysql and I am entering it incorrectly? If that is the case, how do I reset that?

Thanks,

Jeremy
By default the root mysql user has a blank password: just leave the -p off the end of your command line and you should be in business
 

jrmy

macrumors newbie
Original poster
Nov 7, 2007
5
0
Denver, CO
Thanks for trying to help me...

If enter "/usr/local/mysql/bin/mysql -u root -p" (which I assume is the same as "mysql -u root -p" if I had the alais set up correctly) with or without the -p command I get this:

"ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)"

and I didn't enter a password. Then I tried it with every password I could think of and I still got that responce.

I'm trying to figure out all this Unix biz at the same time, so I feel extra dumb. Am I hopeless? I will keep plugging away at this, so if you have other ideas let me know.

Jeremy
 

flacens

macrumors newbie
Nov 20, 2007
11
0
Hello,

I am a complete newbie to all this stuff as well and i've been having the same problems trying to set up MySQL, but i tried all the steps you guys were giving and it seems like it worked if you use the

./bin/mysqladmin -u root password 'password'


BUT MAKE SURE THE PASSWORD IS INSIDE THE QUOTES.
That seemed to work for me. Let me know if i'm way off please

Thanks
Luke
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.