Cannot Create /var/log/mysql/error.log Permission Denied
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About /var/log/mysqld.log permission denied Us Learn more about Stack Overflow the company Business Learn more about hiring chmod: changing permissions of ‘/var/lib/mysql’: operation not permitted developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the chown: changing ownership of `/var/log/mysqld.log': operation not permitted Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up MySQL installation from deb, permissions
Remove All --log-error Configuration Options For --syslog To Take Effect.
issues up vote 0 down vote favorite I am trying to install MySQL on ubuntu 14.04 from the deb packages. I am having trouble starting the mysql server, it looks like a permissions problem. I followed the steps outlined here. Downloaded/untarred/installed deb tar bundle. sudo apt-get install libaio1 tar -xvf mysql-server_5.7.4-m14-2ubuntu14.04_amd64.deb-bundle.tar md5sum mysql-server_5.7.4-m14-2ubuntu14.04_amd64.deb-bundle.tar sudo dpkg -i mysql-common_5.7.4-m14-2ubuntu14.04_amd64.deb sudo dpkg -i mysql-community-server_5.7.4-m14-2ubuntu14.04_amd64.deb sudo dpkg -i mysql-community-client_5.7.4-m14-2ubuntu14.04_amd64.deb sudo a mysqld process already exists dpkg -i libmysqlclient18_5.7.4-m14-2ubuntu14.04_amd64.deb Here is where the files are installed on my system: All configuration files (like my.cnf) are under /etc. All binaries, libraries, headers, etc., are under /usr. The data directory is under /var. Following these instructions I create a mysql group and user: groupadd mysql useradd -r -g mysql mysql I change the ownership of mysql scripts to mysql (as per the instructions, but doubt this is necesssary) cd /usr/bin sudo chown mysql mysq* sudo chgrp mysql mysq* I run mysql_install_db to set up grant tables sudo mysql_install_db --user=mysql I switch back to root the ownership and group of mysql scripts. cd /usr/bin sudo chown root mysq* sudo chgrp root mysq* I change the ownership and group of /data to mysql. Location is /var/lib/mysql cd /var/lib ls -l mysql total 122896 -rw-rw-rw- 1 mysql mysql 56 Jul 26 10:17 auto.cnf -rw-rw-rw- 1 mysql mysql 12582912 Jul 26 10:17 ibdata1 -rw-rw-rw- 1 mysql mysql 50331648 Jul 26 10:17 ib_logfile0 -rw-rw-rw- 1 mysql mysql 50331648 Jul 24 17:36 ib_logfile1 -rw-rw---- 1 mysql mysql 12582912 Jul 26 10:17 ibtmp1 drwxrwxrw- 2 mysql mysql 4096 Jul 24 17:36 mysql drwxrw-rw- 2 mysql mysql 4096 Jul 24 17:36 perform
8th, 2015, 08:43 PMGet this when i try to set mysql password for localhost, what shall I try to do instead? ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) nerdtronJuly 8th, mysqld_safe can't log to error log and syslog at the same time 2015, 10:52 PMDid you already setup a password for mysql root user? Usually you
Mysqld_safe Permission Denied
are asked to provide the mysql root password when you install mysql. To login as mysql root if you haven't setup a
Mysqld_safe Mysqld From Pid File Ended
password yet. mysql -uroot To login as mysql and then input the root password. mysql -uroot -p To RESET the forgotten root password, run the following sequences. How to reset the root password for mysql: http://stackoverflow.com/questions/24979117/mysql-installation-from-deb-permissions-issues ###Stop mysql 1. sudo service mysqld stop ### Be sure that mysqld is stopped 1.1 sudo service mysqld status ###Do not proceed on the next step if it says myslqd is running. ###Run mysql on safe mode 2. sudo mysqld_safe --skip-grant-tables & ###Login as root to mysql safe mode (no password needed here) 3. mysql -u root ###On mysql prompt, run the commands inside mysql to reset the password 4. mysql> use https://ubuntuforums.org/archive/index.php/t-2285870.html mysql; mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root'; mysql> flush privileges; mysql> quit ###Stop mysql safe mode 5. sudo service mysqld stop ###Start mysql on normal mode 6. sudo service mysqld start ###Login to mysql as root using the new password 7. mysql -u root -p erok2July 9th, 2015, 07:17 AMThanks, I tried, but this came up, i have messed up something in the mysql system, nothing i try don't work!! what shall I try to do, to fix this big problem, I have with mysql??? I have even uninstalled the whole mysql - from scratch, I can not set mysql root password at all, the system deny this when I try to installing it again!! erok@eriks-dator:~$ mysql -u root ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) erok@eriks-dator:~$ erok@eriks-dator:~$ service mysql stop stop: Unknown job: mysql erok@eriks-dator:~$ erok@eriks-dator:~$ mysqld_safe --skip-grant-tables & [1] 7357 erok@eriks-dator:~$ 150709 08:10:33 mysqld_safe Can't log to error log and syslog at the same time. Remove all --log-error configuration options for --syslog to take effect. 150709 08:10:33 mysqld_safe Logging to '/var/log/mysql/error.log'. cat: /var/run/mysqld/mysqld.pid: Permission denied rm: cannot remove ‘/var/run/mysqld/mysqld.pid': Permission denied 150709 08:10:33 mysqld_safe Fatal error: Can't remove the pid file: /var/run/mysqld/mysqld.pid Please remove it manually and start /usr/bin/mysqld_safe again; mysqld daemon not started /usr/bin/mysqld_safe: 126: /u
communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of http://askubuntu.com/questions/512375/mysql-fails-to-start-after-upgrade this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Ask Ubuntu Questions Tags Users Badges Unanswered Ask Question _ Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer permission denied The best answers are voted up and rise to the top Mysql fails to start after upgrade up vote 2 down vote favorite I had mysql working fine, and then I upgraded from 5.1 to 5.5. Now I think it was still working after the upgrade, but I'm doubting myself now that I can't get it started again. I have looked at the other similar operation not permitted questions, and none solved my problem. I incorrectly backed up my database, an so any solution which involves reinstalling is not going to be helpful. Output of /var/log/mysql/error.log: 140816 22:35:52 InnoDB: Shutdown completed; log sequence number 2316910 140816 22:35:52 [Note] 140816 22:35:53 [Note] Plugin 'FEDERATED' is disabled. 140816 22:35:53 InnoDB: The InnoDB memory heap is disabled 140816 22:35:53 InnoDB: Mutexes and rw_locks use GCC atomic builtins 140816 22:35:53 InnoDB: Compressed tables use zlib 1.2.8 140816 22:35:53 InnoDB: Using Linux native AIO 140816 22:35:53 InnoDB: Initializing buffer pool, size = 128.0M 140816 22:35:53 InnoDB: Completed initialization of buffer pool 140816 22:35:53 InnoDB: highest supported file format is Barracuda. 140816 22:35:53 InnoDB: Waiting for the background threads to start 140816 22:35:54 InnoDB: 5.5.38 started; log sequence number 2316910 140816 22:35:54 [ERROR] Aborting 140816 22:35:54 InnoDB: Starting shutdown... I have tried starting it several ways, and all give me the same messages (and in most cases, it just hangs on the command line, then silently fails). When running sudo /etc/init.d/mysql start, it does show: Starting MySQL database server mysqld [fail] I'm not exactly sure what the problem is, but it looks like the background threads aren't starting. Any