Hello,
I just reinstalled snow leopard and am having some problems logging into mysql now.
Does anyone know the answer to this problem ?
Below is what happens when I try to login through terminal
Last login: Mon May 30 06:09:35 on ttys000
reg:~ regellis$ /Library/StartupItems/MySQLCOM/MySQLCOM start;
Starting MySQL database server
reg:~ regellis$ mysql;
-bash: mysql: command not found
reg:~ regellis$ /usr/local/mysql/bin/mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
reg:~ regellis$
Below is what happens when I try to view the directory/folder
When I try to "go to" "/usr/local/mysql/bin/mysql" a message pops up
The folder “mysql” can’t be opened because you don’t have permission to see its contents.
I always log into my mac as administrator…………
How to fix root password problem ?
Moderator: General Moderators
Re: How to fix root password problem ?
Run MySQL daemon with --skip-grant-tables option, change root password and restart the server.
There are 10 types of people in this world, those who understand binary and those who don't
Re: How to fix root password problem ?
It doesn't seem to be a problem with password though - mysql cannot connect via socket, which most likely means the socket is not there (server not running or using different path).
Run
look for the daemon process and note the path to it.
Then run and note the path in '--socket' section
run
Now it should connect successfully. If it complains about wrong password, follow the VladSun's advice.
Run
Code: Select all
ps aux | grep mysqld
Then run
Code: Select all
$PATH_YOU_NOTED/mysql_config
run
Code: Select all
/usr/local/mysql/bin/mysql -S $SOCKET_PATH $ANY_OTHER_ARGUMENTS
-
newphper
- Forum Commoner
- Posts: 26
- Joined: Mon Mar 21, 2011 1:48 am
- Location: Bridgeman Downs, Qld, Australia
Re: How to fix root password problem ?
Thank you for your help and advice, I actually used time machine to fix the problem.
For the time being it was the easiest way until I learn more about the MySql commands.
I also found a tool called Tinker Tool, this seems a handy program for macs, have only had my first mac for 2 months now.
For the time being it was the easiest way until I learn more about the MySql commands.
I also found a tool called Tinker Tool, this seems a handy program for macs, have only had my first mac for 2 months now.