root 357 0.0 -0.0 27804 656 ?? S 8:11PM 0:00.03 /bin/sh ./bin/mysqld_safe --datadir=/usr/local/mysql/data --piWhy is this being returned?
mysql 376 0.0 -0.6 61644 13136 ?? S 8:11PM 0:00.64 /usr/local/mysql/bin/mysqld --defaults-extra-file=/usr/local/m
root 453 0.0 -0.0 27368 424 p1 S+ 8:28PM 0:00.01 grep mysql
mysqladmin -u root password nEwpAssWord in Terminal should do the trick if you've never set the root password in mysql before.sudo, I imagine.sudo mysqladmin -u root password nEWpASsWOrd, and your mac will request your account's password.shell>sudo killall -9 mysqld_safeHave I left anything out, or is this series of inputs the entire process?
shell>sudo killall -9 mysqld
shell>ps -auxw | grep mysql
shell>/usr/local/mysql/bin/mysqld --skip-grant-tables.
shell>mysql -u root
mysql>SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpwd');
mysql>SET PASSWORD FOR 'root'@'host_name' = PASSWORD('newpwd');
mysqladmin: connect to server at 'localhost' failedAny thoughts?
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
060517 23:46:19 [Warning] Can't create test file /usr/local/mysql-standard-4.1.18-apple-darwin8.2.0-powerpc/data/Home.lower-testWhy would the Terminal be unable to create the files in question, or change the directory?
/usr/local/mysql/bin/mysqld: Can't change dir to '/usr/local/mysql-standard-4.1.18-apple-darwin8.2.0-powerpc/data/' (Errcode: 13)
060517 23:46:19 [ERROR] Aborting
060517 23:46:19 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
In a Unix environment, the procedure for resetting the root password is as follows:posted by evariste at 12:16 AM on May 18, 2006
Log on to your system as either the Unix root user or as the same user that the mysqld server runs as.
Locate the .pid file that contains the server's process ID. The exact location and name of this file depend on your distribution, hostname, and configuration. Common locations are /var/lib/mysql/, /var/run/mysqld/, and /usr/local/mysql/data/. Generally, the filename has the extension of .pid and begins with either mysqld or your system's hostname.
You can stop the MySQL server by sending a normal kill (not kill -9) to the mysqld process, using the pathname of the .pid file in the following command:
shell> kill `cat /mysql-data-directory/host_name.pid`
Note the use of backticks rather than forward quotes with the cat command; these cause the output of cat to be substituted into the kill command.
Create a text file and place the following command within it on a single line:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPassword');
Save the file with any name. For this example the file will be ~/mysql-init.
Restart the MySQL server with the special --init-file=~/mysql-init option:
shell> mysqld_safe --init-file=~/mysql-init &
The contents of the init-file are executed at server startup, changing the root password. After the server has started successfully you should delete ~/mysql-init.
You should be able to connect using the new password.
/usr/local/mysql/bin/mysql -uroot and got a mysql> prompt.\q gets you back out of the mysql prompt when you're done with it, of course.cd /usr/localsudo rm mysql [this deletes the symlink]sudu rm -rf mysql- [and then hit tab so your Terminal autocompletes the rest of it (it's a long name with a version number and such).]sudo rm -rf mysql-standard-4.1.19-apple-darwin8.5.1-i686/ but since you installed a different version, it'll be some other long string.The only modification I see on that page is adding mysql to your path.Which is harmless to leave alone, since it's using the /usr/local/mysql symlink that will be recreated when you install the 4.1.19 version.
mysql -urootmysql>SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpassword');hostname into your Terminal and it'll tell you. If you want to change it, click on Sharing in System Preferences and change it there.olivia:~ evariste$ sudo /usr/local/mysql/bin/mysqld_safe &
[1] 1010
olivia:~ evariste$ Starting mysqld daemon with databases from /usr/local/mysql/data hit enter when you get this message to get your prompt back.[1] 1010 is a reply from the shell, not part of the command.sudo mysql -uroot next to see if you can log in without a password.sudo /usr/local/mysql/bin/mysql -uroot, and you should have a mysql prompt. I'm crossing my fingers that it doesn't give you the password error.olivia:~ evariste$ file /usr/local/mysql/bin/mysql /usr/local/mysql/bin/mysql: Mach-O executable i386olivia:~ evariste$ ls -alp /usr/local/mysql/bin/mysql-rwxr-xr-x 1 root wheel 1271176 Apr 30 07:15 /usr/local/mysql/bin/mysqlfile command) was whether or not you had the x86 executable; the only reason I could think of for the "cannot execute binary file" was that you somehow had the wrong kind of binary, perhaps PPC. Now I'm trying to figure out if your binary mysql executable file is the same size as the working file that's on my system; if it's not then something went wrong somewhere (and this probably starts to explain why the Pref Pane has an error).ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)But I'm able to enter MySQL via mysql -u root. After creating my tables, though, another command returns this error, which would seem related to the aforementioned issue
ERROR 1044 (42000): Access denied for user '@'localhost' to database 'depot_development'If you run screaming from this thread, I'll certainly understand.
shell>mysql -urootmysql>SET PASSWORD FOR 'root'@'localhost' = PASSWORD('***'); Do I need to provide the SET PASSWORD FOR 'root'@'Home.local' = PASSWORD('***'); line, or anything else, or after that am I set?user '@'localhost'?mysql -uroot -pmysql>\u depot_developmentReading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql>grant all on depot_development.* to 'your os x username'@'localhost' identified by 'somepassword';
posted by justkevin at 7:24 AM on May 16, 2006