Web Hosting Talk







View Full Version : mysql pkg installed w/ gui, but now unable to run - help! monkey in pain!


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

CmptrWz
10-15-2001, 07:48 PM
/etc/rc.d/init.d/mysql start
# Starting mysqld daemon with databases from /home/mysql
011015 15:45:44 mysqld ended

The "mysqld ended" line there tells me that mysql isn't starting properly, therefore if it isn't starting you cannot connect.

monkey_boy
10-16-2001, 02:17 PM
should i reinstall the pkg file?

usually when I've had trouble with a daemon, I undo whatever I changed in the config file - any suggestions?

thank you!

jim

CmptrWz
10-16-2001, 03:09 PM
Your database file is probably corrupt, re-installing the package MIGHT help.

shadowbreed
10-17-2001, 07:55 PM
Had the same problem once, it was because one of the users passwords was in plain text and not encrypted, i just deleted the user from the dir and it worked again after a reboot dunno if it helps but anyways

allera
10-17-2001, 07:58 PM
Also make sure the database directories still have the permissions set correctly. They need to be owned by the user running mysql (actually, I'm not sure about Cobalts, but every installation I've done has been like this). You need to get mysqld to run before you can connect to it. It's not starting for some reason -- check the mysql log file.

monkey_boy
10-19-2001, 05:03 PM
Just in case someone else -more newbie than me - needs this info, here is what I did:

1. uninstalled old package
ssh login, su to root
cd /var/lib/cobalt/uninstallers
ls My*
./MySQL*.uninst

2. remove all databases
(I did not have any databases of value. Please think hard before you do this. you may not need to do this, but I messed up my users table by monkeying around.)
cd /home
rm -fRv mysql*

3.reinstalled the package at the shell
(I had trouble with the package installing via the GUI)
a. upload pkg file to the server
b. login via ssh, go to the directory containing your pkg file
c. type
/usr/local/sbin/cobalt_upgrade RaQ*MySQL*.pkg

go get coffee. Eat a bananna. sloooowwwwwlllllyyyy.

i hope that helps. Thanks again to all for the advice! (anything I've missed?)