monkey_boy
10-15-2001, 06:35 PM
I was trying to lockdown mysql using phpMyAdmin. I removed all users but root@localhost, root@domain.com, normalUser@localhost, normaluser@domain.com and flushed privileges.
Now, I cannot even get in via command line! oh what have I done!?
(bad monkey!)
as root:
/etc/rc.d/init.d/mysql start
# Starting mysqld daemon with databases from /home/mysql
011015 15:45:44 mysqld ended
I dont' think my client can connect:
mysql -u root -p
(I enter my password)
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
locate mysql.sock
/home/tmp/mysql.sock
/home/mysql/mysql.sock
I have a mysql book that suggested:
ln -s /var/lib/mysql/mysql.sock /tmp
I tried the book's root password recovery, in case i have mistyped...
(i used /home/mysql that i figured was specific to my distrbution, but the error refers to /var/lib/mysql anyway!)
safe_mysqld --user=mysql \ --datadir=/home/mysql --skip-grant-tables
Starting mysqld daemon with databases from /var/lib/mysql
011015 15:53:09 mysqld ended
in /etc/my.cnf:
[mysqld server]
skip-networking
log=jimsql.log
(I named the log funny hoping to easily find it. I only want to connect from localhost, too, no tcp)
Any help is greatly appreciated!!!
jim
Now, I cannot even get in via command line! oh what have I done!?
(bad monkey!)
as root:
/etc/rc.d/init.d/mysql start
# Starting mysqld daemon with databases from /home/mysql
011015 15:45:44 mysqld ended
I dont' think my client can connect:
mysql -u root -p
(I enter my password)
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
locate mysql.sock
/home/tmp/mysql.sock
/home/mysql/mysql.sock
I have a mysql book that suggested:
ln -s /var/lib/mysql/mysql.sock /tmp
I tried the book's root password recovery, in case i have mistyped...
(i used /home/mysql that i figured was specific to my distrbution, but the error refers to /var/lib/mysql anyway!)
safe_mysqld --user=mysql \ --datadir=/home/mysql --skip-grant-tables
Starting mysqld daemon with databases from /var/lib/mysql
011015 15:53:09 mysqld ended
in /etc/my.cnf:
[mysqld server]
skip-networking
log=jimsql.log
(I named the log funny hoping to easily find it. I only want to connect from localhost, too, no tcp)
Any help is greatly appreciated!!!
jim
