The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   OS X Developer (http://hintsforums.macworld.com/forumdisplay.php?f=27)
-   -   PHP MySQL on OS X.2 (http://hintsforums.macworld.com/showthread.php?t=9428)

madchemist 02-15-2003 09:40 PM

PHP MySQL on OS X.2
 
I have a dual G4 1Ghz and I just did a completely new install on it to run jaguar (Version 10.2.4)

I want to install PHP MySQL and PHPMyAdmin. I followed directions on http://www.entropy.ch/software/macosx/

And somehow I'm stuck. PHP is running. However MySQL is giving me problems with permissions for some reason.

When I get to the step

/usr/local/bin/mysqladmin -u root password jahova

I get

./bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: NO)'

Ultimately i need to set up phpmyAdmin but I cant do that until I've resolved this permissions problem.

GutBomb 02-15-2003 10:25 PM

you are formatting it wrong

the proper command would be:

/usr/local/bin/mysqladmin -u root -pjahova

note that there is no space between the -p and jahova

however this is a very insecure way to do it, since your terminal history will store this. instead you might want to try:

/usr/local/bin/mysqladmin -u root -p

it will prompt you to type the password instead. it's not a good idea to have your password readable anywhere. all someone has to do is look at your history file or just go to a terminal and press the up arrrow key enough times to see it.

madchemist 02-15-2003 10:34 PM

When I type

/usr/local/bin/mysqladmin -u root -p

I get:

./bin/mysqladmin Ver 8.23 Distrib 3.23.55, for apple-darwin6.3 on powerpc
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Administration program for the mysqld daemon.
Usage: ./bin/mysqladmin [OPTIONS] command command....

-#, --debug=... Output debug log. Often this is 'd:t:o,filename`
-f, --force Don't ask for confirmation on drop database; with
multiple commands, continue even if an error occurs
-?, --help Display this help and exit
--character-sets-dir=...
Set the character set directory
-C, --compress Use compression in server/client protocol
-h, --host=# Connect to host
-p, --password[=...] Password to use when connecting to server
If password is not given it's asked from the tty
-P --port=... Port number to use for connection
-i, --sleep=sec Execute commands again and again with a sleep between
-r, --relative Show difference between current and previous values
when used with -i. Currently works only with
extended-status
-E, --vertical Print output vertically. Is similar to --relative,
but prints output vertically.
-s, --silent Silently exit if one can't connect to server
-S, --socket=... Socket file to use for connection
-u, --user=# User for login if not current user
-v, --verbose Write more information
-V, --version Output version information and exit
-w, --wait[=retries] Wait and retry if connection is down

Default options are read from the following files in the given order:
/etc/my.cnf /usr/local/mysql/data/my.cnf ~/.my.cnf
The following groups are read: mysqladmin client
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit
--no-defaults Don't read default options from any options file
--defaults-file=# Only read default options from the given file #
--defaults-extra-file=# Read this file after the global files are read

Possible variables for option --set-variable (-O) are:
connect_timeout current value: 0
shutdown_timeout current value: 3600

Where command is a one or more of: (Commands may be shortened)
create databasename Create a new database
drop databasename Delete a database and all its tables
extended-status Gives an extended status message from the server
flush-hosts Flush all cached hosts
flush-logs Flush all logs
flush-status Clear status variables
flush-tables Flush all tables
flush-threads Flush the thread cache
flush-privileges Reload grant tables (same as reload)
kill id,id,... Kill mysql threads
password new-password Change old password to new-password
ping Check if mysqld is alive
processlist Show list of active threads in server
reload Reload grant tables
refresh Flush all tables and close and open logfiles
shutdown Take server down
status Gives a short status message from the server
start-slave Start slave
stop-slave Stop slave
variables Prints variables available
version Get version info from server

It doesnt ask me anything? Any ideas?

Thanks

GutBomb 02-15-2003 10:40 PM

mysqladmin is just a tool you use to admin mysql. are you actually trying to go into the databases at the comand line? instead of using mysqladmin try mysql if that is what you are looking for

madchemist 02-15-2003 10:53 PM

im not sure i follow what you mean

GutBomb 02-15-2003 10:55 PM

why exactly are you trying to run mysqladmin?

madchemist 02-15-2003 11:15 PM

i am trying to setup the password for mysql thats all. Ultimately I want to use phpMyAdmin.

GutBomb 02-15-2003 11:25 PM

aha

/usr/local/bin/mysqladmin -u root -p password jahova

it will prompt you for a password. then you should just press enter.

madchemist 02-15-2003 11:44 PM

Yup.

That gives me

usr/local/bin/mysqladmin: Command not found.

GutBomb 02-15-2003 11:46 PM

ok i forgot the slash at the beginning, but that should be obvious :)

madchemist 02-16-2003 12:00 AM

Ok I type

/usr/local/bin/mysqladmin -u root -p password jahova

It says

Enter password:

I type in jahova

and it says

./bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: YES)'


The password I want to set for the mysql user is jahova. What am I doing incorrectly?

GutBomb 02-16-2003 12:09 AM

i said just press enter when it prompts you for a password :)

schwartze 02-16-2003 12:17 AM

the password needs to connected to the -p

mysqladmin -u username -pyourpassword

GutBomb 02-16-2003 12:21 AM

he does not currently have a password, as he just installed mysql, so the -p will simply prompt him

madchemist 02-16-2003 12:25 AM

Quote:

Originally posted by madchemist


I get:

./bin/mysqladmin Ver 8.23 Distrib 3.23.55, for apple-darwin6.3 on powerpc
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Administration program for the mysqld daemon.
Usage: ./bin/mysqladmin [OPTIONS] command command....

-#, --debug=... Output debug log. Often this is 'd:t:o,filename`
-f, --force Don't ask for confirmation on drop database; with
multiple commands, continue even if an error occurs
-?, --help Display this help and exit
--character-sets-dir=...
Set the character set directory
-C, --compress Use compression in server/client protocol
-h, --host=# Connect to host
-p, --password[=...] Password to use when connecting to server
If password is not given it's asked from the tty
-P --port=... Port number to use for connection
-i, --sleep=sec Execute commands again and again with a sleep between
-r, --relative Show difference between current and previous values
when used with -i. Currently works only with
extended-status
-E, --vertical Print output vertically. Is similar to --relative,
but prints output vertically.
-s, --silent Silently exit if one can't connect to server
-S, --socket=... Socket file to use for connection
-u, --user=# User for login if not current user
-v, --verbose Write more information
-V, --version Output version information and exit
-w, --wait[=retries] Wait and retry if connection is down

Default options are read from the following files in the given order:
/etc/my.cnf /usr/local/mysql/data/my.cnf ~/.my.cnf
The following groups are read: mysqladmin client
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit
--no-defaults Don't read default options from any options file
--defaults-file=# Only read default options from the given file #
--defaults-extra-file=# Read this file after the global files are read

Possible variables for option --set-variable (-O) are:
connect_timeout current value: 0
shutdown_timeout current value: 3600

Where command is a one or more of: (Commands may be shortened)
create databasename Create a new database
drop databasename Delete a database and all its tables
extended-status Gives an extended status message from the server
flush-hosts Flush all cached hosts
flush-logs Flush all logs
flush-status Clear status variables
flush-tables Flush all tables
flush-threads Flush the thread cache
flush-privileges Reload grant tables (same as reload)
kill id,id,... Kill mysql threads
password new-password Change old password to new-password
ping Check if mysqld is alive
processlist Show list of active threads in server
reload Reload grant tables
refresh Flush all tables and close and open logfiles
shutdown Take server down
status Gives a short status message from the server
start-slave Start slave
stop-slave Stop slave
variables Prints variables available
version Get version info from server

It doesnt ask me anything? Any ideas?

Thanks
I get this again.

GutBomb 02-16-2003 12:26 AM

you type: /usr/local/bin/mysqladmin -u root -p password jahova

and then when it prompts you for a password you just press enter and it spits all that stuff out at you?

madchemist 02-16-2003 12:29 AM

No when I type that I get

./bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: YES)'

GutBomb 02-16-2003 12:32 AM

then you already have a password set. read the documentation that came with your version of mysql for more information on installing it, since it seems like you may not have gotten an official version.

schwartze 02-16-2003 01:05 AM

Quote:

Originally posted by GutBomb
he does not currently have a password, as he just installed mysql, so the -p will simply prompt him
to set the password he should be typing

Code:

mysql -u root password passwordhewasnts

madchemist 02-16-2003 01:05 PM

I sthere a way to just delete mySql from my machine along with the usr and password and start over. This trouble shooting isnt working.

Thanks


All times are GMT -5. The time now is 05:36 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.