mac_shinobi Posted November 23, 2007 Posted November 23, 2007 Have tried the universal dmg file and following the guide on there site with regards to using terminal to set the root password by using the command mysqladmin -u root password 'newpassword' and I can get onto the logon page of myphpadmin but I can not logon using no password or even the newpassword set prior. apache and php work as configured those earlier. Just need some help with getting mysql to work on os x as it would be nice to use mysql with php on os x. Not really sure where I am going wrong ?
Rozzer Posted November 23, 2007 Posted November 23, 2007 If i want setup a sql server quickly and php appache i use a program called mamp which is just a click of a button and runs all services Ross
kingswood Posted November 23, 2007 Posted November 23, 2007 Yep. MAMP is the way to go for this. If you have compiled MySQL and PHP from source though it can obviously offer some things that a packaged version can't (and you learn some stuff too). Did you enter the path to your MySQL before the password command? /usr/local/mysql/bin/mysqladmin Or you could add this path to your PATH environment variable /usr/local/mysql/bin Log in to MySQL as root: mysql -u root -p Password: and that gets you to the correct prompt. So, in conclusion, unless you have entered the path to the mysql/bin directory in your PATH environment variable, you need to type that in before trying to set the password using the command you tried. HTH Paul
mac_shinobi Posted November 23, 2007 Author Posted November 23, 2007 Last login: Fri Nov 23 10:13:23 on console Welcome to Darwin! Shane:~ srussell$ /usr/local/mysql/bin/mysqladmin /usr/local/mysql/bin/mysqladmin Ver 8.41 Distrib 5.0.45, for apple-darwin8.6.0 on powerpc Copyright © 2000-2006 MySQL 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: /usr/local/mysql/bin/mysqladmin [OPTIONS] command command.... -c, --count=# Number of iterations to make. This works with -i (--sleep) only. -#, --debug[=name] 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. -C, --compress Use compression in server/client protocol. --character-sets-dir=name Directory where character sets are. --default-character-set=name Set the default character set. -?, --help Display this help and exit. -h, --host=name Connect to host. -p, --password[=name] 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. --protocol=name The protocol of connection (tcp,socket,pipe,memory). -r, --relative Show difference between current and previous values when used with -i. Currently works only with extended-status. -O, --set-variable=name Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value. -s, --silent Silently exit if one can't connect to server. -S, --socket=name Socket file to use for connection. -i, --sleep=# Execute commands again and again with a sleep between. --ssl Enable SSL for connection (automatically enabled with other flags). Disable with --skip-ssl. --ssl-ca=name CA file in PEM format (check OpenSSL docs, implies --ssl). --ssl-capath=name CA directory (check OpenSSL docs, implies --ssl). --ssl-cert=name X509 cert in PEM format (implies --ssl). --ssl-cipher=name SSL cipher to use (implies --ssl). --ssl-key=name X509 key in PEM format (implies --ssl). --ssl-verify-server-cert Verify server's "Common Name" in its cert against hostname used when connecting. This option is disabled by default. -u, --user=name User for login if not current user. -v, --verbose Write more information. -V, --version Output version information and exit. -E, --vertical Print output vertically. Is similar to --relative, but prints output vertically. -w, --wait[=#] Wait and retry if connection is down. --connect_timeout=# --shutdown_timeout=# Variables (--variable-name=value) and boolean options {FALSE|TRUE} Value (after reading options) --------------------------------- ----------------------------- count 0 force FALSE compress FALSE character-sets-dir (No default value) default-character-set (No default value) host (No default value) port 0 relative FALSE socket (No default value) sleep 0 ssl FALSE ssl-ca (No default value) ssl-capath (No default value) ssl-cert (No default value) ssl-cipher (No default value) ssl-key (No default value) ssl-verify-server-cert FALSE user (No default value) verbose FALSE vertical FALSE connect_timeout 43200 shutdown_timeout 3600 Default options are read from the following files in the given order: /etc/my.cnf ~/.my.cnf /usr/local/mysql/etc/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 Where command is a one or more of: (Commands may be shortened) create databasename Create a new database debug Instruct server to write debug information to log 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, MySQL 4.1 hashing. old-password new-password Change old password to new-password in old format. 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 Shane:~ srussell$ mysql -u root -p -bash: mysql: command not found Shane:~ srussell$ ^^^^^^^^^^^^^^^^^^^^^^^ I didnt try this part : you could add this path to your PATH environment variable /usr/local/mysql/bin However when I use phpmyadmin and try to logon I get the following error that is attached as per screenshot. Also when I used the universal installer for mysql it never gave me a chance to set a root password and I have tried the commands to set one but with no success. btw MAMP is pretty nice although its bugging me that I can get apache and php to work fine but not mysql doh ! Shane
kingswood Posted November 23, 2007 Posted November 23, 2007 Go through this tutorial here and see if you missed a couple of steps: http://hivelogic.com/narrative/articles/installing-mysql-on-mac-os-x Good luck with that one Paul
mac_shinobi Posted November 23, 2007 Author Posted November 23, 2007 Im gonna need it lol Thanks Shane
mac_shinobi Posted November 28, 2007 Author Posted November 28, 2007 Followed that guide but am stuck on this bit: Setting the Path Do not skip this step! Most everything else will fail if you do. Mac OS X, like other UNIX systems, uses something called a path to determine where it should look for applications on the command line (that is, when you’re using the Terminal app). The path is actually an environment variable, set by a special file that’s automatically executed when you open a new Terminal window. To see if the path has been set properly, we can check the contents of the .bash_login file (the special file hidden in our home folder) for a PATH line using a text editor. TextMate, TextWrangler, BBEdit, and vi are all perfectly good options. To open the file with TextMate, for example, we can type: mate ~/.bash_login yes i did install textmate first before i did that command
mac_shinobi Posted November 30, 2007 Author Posted November 30, 2007 bump - going to do a fresh install of os x just to clean up all the stuff thats happened to this install of os x that I have currently including the stuff that ive done on mysql. which guide do I use to install mysql on os x 10.4.11 because so far i get so far ( which isnt very far ) and then become stuck again. Need something that works - please
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now