Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
SMS Forum Index » SMS User Support

Post new topic   Reply to topic
mysql won't connect
View previous topic :: View next topic  
Author Message
baboo
Senior Member


Joined: 04 Sep 2007
Posts: 676

PostPosted: Mon Jun 07, 2010 4:35 pm    Post subject: mysql won't connect Reply with quote

since I did an upgrade a week ago, I have not had a need to connect mysql. Today I needed to connect but can't. Here is msg:

mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)

the pid is running.

I find no error msgs other than above. How can I fix?

Different issue: You had said in previous post that you would create a config to preserve webmin settings. However, upon reboot of server after upgrade my webmin settings were changed to default. Just thought I would let you know Smile
Back to top
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1753
Location: Greece

PostPosted: Mon Jun 07, 2010 5:54 pm    Post subject: Reply with quote

Mysql is not running due to package tables upgrade...
That's a bugger and happens only once you upgrade an older release, and happens once.
To fix it, rename/var/lib/mysql/mysql to /var/lib/mysql/mysql.old and remove /var/lib/mysql/test and all bins in /var/lib/mysql NOT the databases.
reinstall mysql package with "installpkg" and restore user.MDY and user.MYI or start mysql and grant privileges from mysql console.

As for webmin Embarassed I did it again.
What is the config you have altered?
I could create a config script for all config in /etc/webmin though.
I'll fix that.

gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
baboo
Senior Member


Joined: 04 Sep 2007
Posts: 676

PostPosted: Mon Jun 07, 2010 6:08 pm    Post subject: Reply with quote

sorry - wife said she had some chores for me Sad . Okay, I will give it a try. So, everytime I upgrade that will have to happen?


On Webmin:

I lost my password and port changes. That's it. But biggies because, anyone knowing that I am using SMS could login to webmin by entering admin:admin. Also, my firewall is looking for a certain port for remote login.
Back to top
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1753
Location: Greece

PostPosted: Mon Jun 07, 2010 6:40 pm    Post subject: Reply with quote

No only once, I haven't notice any difference yet.
Webmin saves the info in miniserv.conf & miniserv.users under /etc/webmin/
Just so you know from now on.
I'll make a script though Smile

gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
baboo
Senior Member


Joined: 04 Sep 2007
Posts: 676

PostPosted: Mon Jun 07, 2010 8:07 pm    Post subject: Reply with quote

Embarassed I don't know how to restore user.MDY. I searched MYSQl's website and the only thing I found was a link to changing privileges.

Would you mind pointing me to a link on how to do that?

thanks
Back to top
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1753
Location: Greece

PostPosted: Mon Jun 07, 2010 8:24 pm    Post subject: Reply with quote

Stop mysql if it's running and do
cp -a /var/lib/mysql/mysql.old/user.MDY /var/lib/mysql/mysql/
if permissions are wrong do a
chown -R mysql:mysql /var/lib/mysql
Start mysql

gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
baboo
Senior Member


Joined: 04 Sep 2007
Posts: 676

PostPosted: Mon Jun 07, 2010 8:39 pm    Post subject: Reply with quote

had a feeling that was the answer Smile

thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SMS Forum Index » SMS User Support All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

SMS - Superb! Mini Server Project © 2016
Powered by phpBB © 2001, 2002 phpBB Group
iCGstation v1.0 Template By Ray © 2003, 2004 iOptional