[BlueOnyx:21110] Re: User permission change gone wrong ...

Don Teague blueonyx at donteague.com
Mon Jun 12 23:46:10 -05 2017


Found it. More side effects from the user permission change. The
/home/mysql/mysql didn't get changed back to mysql:mysql permissions.
-- 
-- 
Don Teague
donteague.com




> Don Teague <mailto:blueonyx at donteague.com>
> Monday, June 12, 2017 23:32
> I've done 1, 2, and 3, but I can't get MySQL to start now.
>
> Any ideas? Here's the data I've collected so far.
>
>
> [root at bo-x1 log]# tail -f mysqld.log
> 170612 23:15:11 mysqld_safe mysqld from pid file
> /var/run/mysqld/mysqld.pid ended
> 170612 23:23:00 mysqld_safe Starting mysqld daemon with databases from
> /var/lib/mysql
> /usr/libexec/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
> 170612 23:23:00 [ERROR] Can't open the mysql.plugin table. Please run
> mysql_upgrade to create it.
> 170612 23:23:00  InnoDB: Initializing buffer pool, size = 8.0M
> 170612 23:23:00  InnoDB: Completed initialization of buffer pool
> 170612 23:23:01  InnoDB: Started; log sequence number 1 2117275339
> 170612 23:23:01 [ERROR] /usr/libexec/mysqld: Can't find file:
> './mysql/host.frm' (errno: 13)
> 170612 23:23:01 [ERROR] Fatal error: Can't open and lock privilege
> tables: Can't find file: './mysql/host.frm' (errno: 13)
> 170612 23:23:01 mysqld_safe mysqld from pid file
> /var/run/mysqld/mysqld.pid ended
>
> [root at bo-x1 log]# mysql_upgrade
> Looking for 'mysql' as: mysql
> Looking for 'mysqlcheck' as: mysqlcheck
> Running 'mysqlcheck with default connection arguments
> mysqlcheck: Got error: 2002: Can't connect to local MySQL server
> through socket '/var/lib/mysql/mysql.sock' (2) when trying to connect
> FATAL ERROR: Upgrade failed
>
>
> [root at bo-x1 log]# grep mysql messages
> ...
> Jun 12 23:22:54 bo-x1 logger: ***** cce_construct:
> /usr/sausalito/constructor/base/mysql/setup_mysql_data.pl
> Jun 12 23:22:56 bo-x1 logger: ***** cce_construct:
> /usr/sausalito/constructor/base/netdata/update_mysqlPass.pl
> Jun 12 23:22:56 bo-x1 logger: *** cce_construct:
> /usr/sausalito/constructor/Compass/webapps/webapp_mysql_defaults.pl
>
> [root at bo-x1 log]# /etc/init.d/mysqld restart
> Stopping mysqld:                                           [  OK  ]
> MySQL Daemon failed to start.
> Starting mysqld:                                           [FAILED]
>
> [root at bo-x1 log]# /usr/libexec/mysqld start
> /usr/libexec/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
> 170612 23:30:26 [ERROR] Can't open the mysql.plugin table. Please run
> mysql_upgrade to create it.
> 170612 23:30:26  InnoDB: Initializing buffer pool, size = 8.0M
> 170612 23:30:26  InnoDB: Completed initialization of buffer pool
> 170612 23:30:26  InnoDB: Started; log sequence number 1 2117275339
> /usr/libexec/mysqld: Too many arguments (first extra is 'start').
> Use --verbose --help to get a list of available options
> 170612 23:30:26 [ERROR] Aborting
>
> 170612 23:30:26  InnoDB: Starting shutdown...
>
> 170612 23:30:31  InnoDB: Shutdown completed; log sequence number 1
> 2117275339
> 170612 23:30:31 [Note] /usr/libexec/mysqld: Shutdown complete
>
>
>
>
>
> _______________________________________________
> Blueonyx mailing list
> Blueonyx at mail.blueonyx.it
> http://mail.blueonyx.it/mailman/listinfo/blueonyx
> Michael Stauber <mailto:mstauber at blueonyx.it>
> Monday, May 15, 2017 1:50
> Hi Don,
>
>
> Yikes. That's indeed pretty bad. :-/
>
> The RPM database is your best bet for a recovery of most things that
> were installed via RPM's. Sadly that won't fix permissions/ownerships
> for things that were then modified (or created) via the RPM's
> post-install scripts. But there is also a cure for that.
>
> Give this a try:
>
> 1) To reset uids and gids on files and directories :
>
> for u in $(rpm -qa); do rpm --setugids $u; done
>
> 2) To permissions on files and directories
>
> for p in $(rpm -qa); do rpm --setperms $p; done
>
> Lastly: You might want to reinstall all RPMs to *really* make sure
> everything is back in proper order. So here is a one-liner for that
> purpose:
>
> 3.) Reinstall of all RPMs via polling RPM database and then using YUM:
>
> rpm -qa --qf '%{name} ' | xargs yum reinstall -y
>
> The first part polls the RPM database for *all* installed RPMs and
> formats the output into a single line that contains just the RPM names
> and has each name followed by an intentional space.
>
> We then use xargs to pass this long list of RPMs to reinstall directly
> to "yum reinstall -y " (yes, there is a space at the end!) and it will
> reinstall every RPM via YUM that can be fetched via YUM. This might not
> cover things that came with PKGs, though. Or things which no longer are
> available via YUM for one reason or another.
>
> If there are problems with software that came via PKGs: Just uninstall
> and reinstall them via the GUI to solve these issues.
>
> All in all: This should get you back onto your feet and this is as good
> as it'll get.
>
> Don Teague <mailto:blueonyx at donteague.com>
> Monday, May 15, 2017 0:39
> Full disclosure, it was a fat-finger/ID10T error...
>
> But I managed to royally foul up permissions server wide. Is there any
> sort of script out there that will get /etc/ /usr/, and so forth back to
> normal. I think I'm getting close.
>
> Still can't su to root, but can get to root if I change the SSH
> permissions to allow root via the GUI. (Yes, I disable right away.)
>

-- 
-- 
Don Teague
donteague.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.blueonyx.it/pipermail/blueonyx/attachments/20170612/cedafae1/attachment.html>


More information about the Blueonyx mailing list