linux - MySQL installation from deb, permissions issues -


I'm trying to install MySQL on Microsoft 14.04 from deb package. I'm having trouble starting mysql server, it looks like a permission problem I followed the steps I mentioned. Download / Unreserved / Installed Deb Tark 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-2UNTUU 14.04_AMDI 64. ADB-Bundle. Sudo DPKG-Eye MySQL-Common_5.7.4-M14 Ubuntu 14.04_AMD64. Deb Shadow DPKG-IISLL-Community-Server_7.4.4-M14 Ubuntu 14.04_Amdi 64. Deb Schuo Dpkg -i mysql-community-client_5.7.4- M14-214.04_Amadi64.deb sudo dpkg -i libmysqlclient18_5.7.4-m14-2ubuntu14.04_ amidi 64.deb  

This is where the files are installed on my system: All configuration files (Such as my.cnf ) under / etc . All binaries, libraries, headers, etc. are under the data directory under the / var .

I am creating a MySQL group and user:

  groupadd mysql useradd -r -g mysql mysql  

I change the ownership of mysql scripts to mysql (according to instructions, but it is doubtful that it is necessary)

  CD / User / Bin Sudo Crown MySQL MySak sudo chgrp Mysql mysq *  

I run mysql_install_db to set the grant table

  sudo mysql_install_db --user = mysql  

I'll switch back to ownership and Root mysql group of scripts

  cd / usr / bin sudo chown root mysq * sudo chgrp root mysq *  

I / data mysql on location / var / lib / mysql

  cd / var / lib ls -l mysql Total 122896 -Rye-RY-RW-1sssl mysql 56 July 26 10:17 auto.cnf-rw-rw-rw-1 mysql mysql 12582912 July 26 10:17 Ibadata 1-R-R-R-1-1 MySQL ISSL 50331648 July 26 10:17 IB_LogFile -R- R-R-1-R1-1 MYSQL mysql 50331648 July 24 17:36 ib_logfile1-rw-rw ---- 1 mysql mysql 12582912 July 26 10:17 ibtmp1 drwxrwxrw- 2 mysql mysql 4096 July 24 17:36 mysql drwxrw -rw-2 mysql mysql 4096 July 24 17:36 Performance_schema   

Now, when I try to start the mysql server, I get permission errors: P> mysqld_safe --user = mysql & amp; [4] 5680 / var / lib $ 140727 00:42:17 '/var/log/mysql/error.log' to mysqld_safe logging. Cat: /var/run/mysqld/mysqld.pid: Permission denied RM: Can not delete '/var/run/mysqld/mysqld.pid': Permission denied 140727 00:42:17 mysqld_safe Fatal error: do not delete the pid File: /var/run/mysqld/mysqld.pid Please manually delete it and start / usr / bin / mysqld_safe again; Mysqld daemon did not start / usr / bin / mysqld_safe: 129: can make / usr / bin / mysqld_safe: /var/log/mysql/error.log: permission denied

similarly , If I try to start the server as root:

  mysqld_safe -p -u root 140727 00:54:08 to mysqld_safe logging '/ var / log / mysql / Error.log '. 140727 00:54:08 mysqld_safe / var / lib / mysql / usr / bin / mysqld_safe: 129: / usr / bin / mysqld_safe can start mysqld daemon with the database: /var/log/mysql/error.log : Permission denied / usr / bin / mysqld_safe: 1: eval: can create /var/log/mysql/error.log: permission denied 140727 00:54:08 from mysqld_safe mysqld pid file / var / run / mysqld / mysqld. Pid end / usr / bin / mysqld_safe: 12 9: can create / usr / bin / mysqld_safe: /var/log/mysql/error.log: permission denied  

apparently there There are many places where I should change permissions, which do not see the way to go N:

  1. What should a clear point where I went wrong, or I should just cancel the installation and see everything?

  2. Do the owners need to update MySQL and group mysql which server needs to be updated?

  3. Is there a comprehensive list of files where these files are?

You can not create /var/log/mysql/error.log First create the directory if it does not exist

  sudo mkdir -p / var / log / mysql  

Next, change ownership

  sudo chown-r mysql / var / log / mysql  

and then try to start the server as root:

  Sudo mysqld_safe --user = isssl & amp;  

If the server does not paste error messages here


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -