Click to See Complete Forum and Search --> : Lost password


august
02-15-2006, 12:07 PM
I can't figure out the password to connect to mysql.

Is there anyway to retreive the password somehow, or do I need to reinstall the software? (Mac os x)

Jick
02-15-2006, 02:29 PM
I could tell you if it were Windows. Can't say as much for Mac though. If you wait for awhile I'm sure someone can help you out. You might also try searching Google (http://www.google.com/) if you haven't already... ;)

A1ien51
02-15-2006, 03:05 PM
My shot in the dark would tell me to delete the user for the account and recreate it.

Eric

chazzy
02-15-2006, 03:11 PM
What version did you install? If you didn't specify one during install, there is no password (not dependent on the OS) unless Jick's going to point out something that I overlooked.

Jick
02-15-2006, 04:40 PM
I guess I may have misconstrued the question. I thought he meant he had a password before and just forgot it or something. I was thinking of solutions from the command line. I know how to reset a password for MySQL on Windows from the command line but I've never really used Mac that much so I didn't know if there was any relation. Sorry if I confused anyone. I guess I'll just keep my mouth shut and let someone who knows answer next time. :p

august
02-15-2006, 11:08 PM
Thanks everyone, I appreciated your help. (You co-authored Ajax in Action? Wow, webdeveloper.com's some place to be, heard that's a good book).


I didn't specify a password upon downloading mysql. The problem happens when trying to connect to mysql via the Terminal cmnd-line. The "mysql -u <username> -h <host> -p <password>" yields null, nothing there of mysql nature, even though mysql is up and running according to the phpinfo() table.

The problem could be another. Saw on google that the path might be missing. But how in the world the path to mysql is set in the Terminal application is a science of its own. Don't have time for 4 years at Harvard . Rather give up on mysql :) . Thanks all.

:cool:

NogDog
02-16-2006, 12:43 AM
You might want to consider installing XAMPP: it automates the installation of PHP, MySQL, Apache, and phpMyAdmin onto your PC.

http://www.apachefriends.org/en/xampp.html

Jick
02-16-2006, 01:44 AM
Or WAMP (http://www.wampserver.com/en/)... :D

august
02-16-2006, 04:05 AM
Jick, I checked out your website. You seem to have gone through the same issue that I'm going through. That's to position a div with a certain top-margin and have it consistent across browsers. Do you have any tips? In my case, 115px top-margin is different in IE from Firefox, and causes imbalances. How'd you get through that? :)

Thanks all, I'll check out what you provided and see if any solution comes up.

chazzy
02-16-2006, 07:36 AM
if you set no password during installation, there is no password on the account, so drop the -p<password> and it would work fine.

Jick
02-16-2006, 04:03 PM
Jick, I checked out your website. You seem to have gone through the same issue that I'm going through. That's to position a div with a certain top-margin and have it consistent across browsers. Do you have any tips? In my case, 115px top-margin is different in IE from Firefox, and causes imbalances. How'd you get through that? :)I'm not sure I fully understand what you're asking... Perhaps you can PM this question to me in more detail...
Don't respond here though. We don't want to take this any further off-topic. ;)

august
02-16-2006, 07:34 PM
Ok. It seems though as if mysql doesn't even work, even though it's in the phpinfo().

For example, in the Terminal mysql is not working period.

Is there a fast convenient way, outside of the phpinfo(), to check for mysql activity?
At least, when I've tried to use the mysql functions of php, the page goes blank.
Could you for example, just check for the existence of databases, but outside of the command line?


Jick, I'll email you if I have the time.

Thanks.

NogDog
02-16-2006, 07:44 PM
Are you running on Windows? If so, bring up Task Manager, select the Processes tab, and see if there's a process running called something like mysqld-nt.exe.

chazzy
02-16-2006, 07:44 PM
did you start running mysql? what error are you getting back?

august
02-16-2006, 08:22 PM
I don't see any kind of error. (using Mac os x).

It's said that to bring up mysql on mac os you go to the Terminal (the Mac commandline) and just type in "mysql -h -u -p" and fill in the required fields after the prompt. After that the prompt should change to "mysql". But when trying it sais something like "mysql is not a recognized command", or in that direction. Even if no password is supplied.

When trying to connect via php, with mysql_connect($username, $localhost,''), the page goes blank. That's why it's hard to identify the problem.

Maybe mysql just needs to be reinstalled. I just don't want to clutter up the directories with more dmg or exe files without knowing which one of them will be obsolete, or having to remember just that. Perhaps, if you re-install mysql it will overwrite any previous installation? If so, that'd be nice. :) Because it would be easier than trying to find out about the details of the problem :D .

chazzy
02-16-2006, 09:25 PM
ok.

1) you might need to use the path to the directory for mysql (or change into that directory) in order to use the command. Does Mac allow you to have global app names that you can just type? i forget the term.

2) php is weird. if you're used to java (like i am) and you do an error in PHP you're going to start ripping your hair out - blank pages means there's an error and your php file isn't configured to show all errors. try adding this to the top of your script:
error_reporting(E_ALL);

You can also use mysql_error() and die() to catch errors in your code like this:
mysql_connect($host,$user,$pass) or die('unable to connect to server: '.mysql_error());

august
02-16-2006, 10:31 PM
Oh, so mysql_error() doesn't write anything to the browser? Because when I used it nothing showed up?

chazzy
02-16-2006, 11:16 PM
maybe you should show the code you're using. you might have an error in your syntax.