Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
[shellyd34@localhost ~]$ sudo service mysqld start
Starting mysqld (via systemctl): Job failed. See system logs and 'systemctl status' for details.
[FAILED]
I also tried this and got this
[shellyd34@localhost ~]$ mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[shellyd34@localhost ~]$ mysql_install_db --user=mysql
chown: changing ownership of `/var/lib/mysql': Operation not permitted
Cannot change ownership of the database directories to the 'mysql'
user. Check that you have the necessary permissions and try again.
changed ownership of `/var/log/ppp' to mysql:mysql
changed ownership of `/var/log/messages' to mysql:mysql
changed ownership of `/var/log/vmware-tools-upgrader.log' to mysql:mysql
changed ownership of `/var/log/cron' to mysql:mysql
changed ownership of `/var/log/tallylog' to mysql:mysql
changed ownership of `/var/log/wtmp' to mysql:mysql
changed ownership of `/var/log/gdm/:0.log.1' to mysql:mysql
changed ownership of `/var/log/gdm/:0-greeter.log.4' to mysql:mysql
changed ownership of `/var/log/gdm/:0-slave.log.2' to mysql:mysql
changed ownership of `/var/log/gdm/:0-slave.log.3' to mysql:mysql
changed ownership of `/var/log/gdm/:0-slave.log.1' to mysql:mysql
changed ownership of `/var/log/gdm/:0-greeter.log.2' to mysql:mysql
changed ownership of `/var/log/gdm/:0.log' to mysql:mysql
changed ownership of `/var/log/gdm/:0-greeter.log.1' to mysql:mysql
changed ownership of `/var/log/gdm/:0.log.4' to mysql:mysql
changed ownership of `/var/log/gdm/:0.log.3' to mysql:mysql
changed ownership of `/var/log/gdm/:0-greeter.log' to mysql:mysql
changed ownership of `/var/log/gdm/:0.log.2' to mysql:mysql
changed ownership of `/var/log/gdm/:0-slave.log.4' to mysql:mysql
changed ownership of `/var/log/gdm/:0-slave.log' to mysql:mysql
changed ownership of `/var/log/gdm/:0-greeter.log.3' to mysql:mysql
changed ownership of `/var/log/gdm' to mysql:mysql
changed ownership of `/var/log/secure-20150727' to mysql:mysql
changed ownership of `/var/log/Xorg.0.log' to mysql:mysql
changed ownership of `/var/log/pm-powersave.log' to mysql:mysql
changed ownership of `/var/log/cron-20150727' to mysql:mysql
changed ownership of `/var/log/messages-20150727' to mysql:mysql
changed ownership of `/var/log/btmp' to mysql:mysql
changed ownership of `/var/log/secure' to mysql:mysql
changed ownership of `/var/log/anaconda/anaconda.log' to mysql:mysql
changed ownership of `/var/log/anaconda/anaconda.syslog' to mysql:mysql
changed ownership of `/var/log/anaconda/anaconda.program.log' to mysql:mysql
changed ownership of `/var/log/anaconda/anaconda.yum.log' to mysql:mysql
changed ownership of `/var/log/anaconda/anaconda.ifcfg.log' to mysql:mysql
changed ownership of `/var/log/anaconda/anaconda.xlog' to mysql:mysql
changed ownership of `/var/log/anaconda/anaconda.storage.log' to mysql:mysql
changed ownership of `/var/log/anaconda' to mysql:mysql
changed ownership of `/var/log/ntpstats' to mysql:mysql
changed ownership of `/var/log/mail/statistics' to mysql:mysql
changed ownership of `/var/log/mail' to mysql:mysql
changed ownership of `/var/log/boot.log-20150727' to mysql:mysql
changed ownership of `/var/log/maillog-20150727' to mysql:mysql
changed ownership of `/var/log/spooler' to mysql:mysql
changed ownership of `/var/log/speech-dispatcher' to mysql:mysql
changed ownership of `/var/log/boot.log' to mysql:mysql
changed ownership of `/var/log/Xorg.0.log.old' to mysql:mysql
changed ownership of `/var/log/spooler-20150727' to mysql:mysql
changed ownership of `/var/log/lastlog' to mysql:mysql
changed ownership of `/var/log/yum.log' to mysql:mysql
changed ownership of `/var/log/prelink/prelink.log' to mysql:mysql
changed ownership of `/var/log/prelink' to mysql:mysql
changed ownership of `/var/log/ConsoleKit/history' to mysql:mysql
changed ownership of `/var/log/ConsoleKit' to mysql:mysql
changed ownership of `/var/log/maillog' to mysql:mysql
changed ownership of `/var/log/dracut.log' to mysql:mysql
changed ownership of `/var/log/audit/audit.log' to mysql:mysql
changed ownership of `/var/log/audit' to mysql:mysql
changed ownership of `/var/log/sssd' to mysql:mysql
changed ownership of `/var/log/' to mysql:mysql
Sure, you can simply type [CODE]...[/CODE] around the pasted text. Or in the editor box you can hilight the selected text by click-drag then click on the # icon at top. If you do not see the # icon, click Go Advanced at bottom to get to all the options.
Doing so makes pasted code much more readable and preserves indentation, etc... thanks for trying!
Why did you do that?! You DEFINITELY do not want to change all logs to mysql:mysql!
That is definitely going to break many things!
DO NOT DO ANYTHING ELSE until you get these fixed - and there is not a simple way to fix it because many logs are not owned by root but by their process owners...
I do not mean this unkindly, but obviously so! Please stay away from heavy weapons and aircraft controls!
Is this a production machine or your own learning machine?
If a production machine then you will need to quickly find out what user normally owns what logs and change them back individualy, maybe from your backups. Many will be owned by root, but simply resetting all to root will break others and is also a huge security risk in some cases.
If you have the install media and another machine or VM to install to, I might suggest doing a quick installation then looking into /var/log to get most of the ownerships.
Or if there is another Fedora user here willing to volunteer the ownerships from their system you could reset many that way.
If this is a learning machine without much stuff on it, a quick reinstall might be easiest.
And be sure to note my own first two rules of troubleshooting:
Quote:
1. NEVER do anything until you have a good reason - don't push buttons or type commands without knowledge!
2. ALWAYS know what you expect to happen next - if it does you gain ground, if it doesn't you can at least understand why.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.