| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| baboo Senior Member
 
 
 Joined: 04 Sep 2007
 Posts: 676
 
 
 | 
			
				|  Posted: Mon Jun 07, 2010 4:35 pm    Post subject: mysql won't connect |   |  
				| 
 |  
				| 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
  |  | 
	
		| Back to top |  | 
	
		| gerasimos_h Site Admin
 
 
 Joined: 09 Aug 2007
 Posts: 1757
 Location: Greece
 
 | 
			
				|  Posted: Mon Jun 07, 2010 5:54 pm    Post subject: |   |  
				| 
 |  
				| 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
  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 |  | 
	
		| baboo Senior Member
 
 
 Joined: 04 Sep 2007
 Posts: 676
 
 
 | 
			
				|  Posted: Mon Jun 07, 2010 6:08 pm    Post subject: |   |  
				| 
 |  
				| sorry - wife said she had some chores for me  . 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 |  | 
	
		| gerasimos_h Site Admin
 
 
 Joined: 09 Aug 2007
 Posts: 1757
 Location: Greece
 
 | 
			
				|  Posted: Mon Jun 07, 2010 6:40 pm    Post subject: |   |  
				| 
 |  
				| 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
   
 gerasimos_h
 _________________
 Superb! Mini Server Project Manager
 http://sms.it-ccs.com
 |  | 
	
		| Back to top |  | 
	
		| baboo Senior Member
 
 
 Joined: 04 Sep 2007
 Posts: 676
 
 
 | 
			
				|  Posted: Mon Jun 07, 2010 8:07 pm    Post subject: |   |  
				| 
 |  
				|  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 |  | 
	
		| gerasimos_h Site Admin
 
 
 Joined: 09 Aug 2007
 Posts: 1757
 Location: Greece
 
 | 
			
				|  Posted: Mon Jun 07, 2010 8:24 pm    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		| baboo Senior Member
 
 
 Joined: 04 Sep 2007
 Posts: 676
 
 
 | 
			
				|  Posted: Mon Jun 07, 2010 8:39 pm    Post subject: |   |  
				| 
 |  
				| had a feeling that was the answer   
 thanks
 |  | 
	
		| Back to top |  | 
	
		|  |