LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 09-09-2016, 03:24 PM   #1
zillur
Member
 
Registered: Apr 2015
Posts: 217

Rep: Reputation: Disabled
mysqsl installation problem


Hi there,
I was trying to install mysql in my server. It seems I have installed the package but can't run it. Any suggestion about that?
Code:
[root@genomics mysql]# yum install mysql-community-{client,common,libs}-*
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.uprm.edu
 * epel: archive.linux.duke.edu
 * extras: mirrors.uprm.edu
 * updates: mirrors.uprm.edu
Package mysql-community-client-5.7.15-1.el7.x86_64 already installed and latest version
Package mysql-community-common-5.7.15-1.el7.x86_64 already installed and latest version
Package mysql-community-libs-5.7.15-1.el7.x86_64 already installed and latest version
Package mysql-community-libs-compat-5.7.15-1.el7.x86_64 already installed and latest version
Nothing to do
Code:
[root@genomics mysql]# service mysqld start
Redirecting to /bin/systemctl start  mysqld.service
Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.
Code:
[root@genomics mysql]# dpkg --configure mysql
dpkg: error processing mysql (--configure):
 no package named `mysql' is installed, cannot configure
Errors were encountered while processing:
 mysql
Best Regards
Zillur
 
Old 09-09-2016, 03:55 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
dpkg isn't used on RHEL7 or derivatives such as CentOS7 which appears to be what you're running as indicated by the "el7" portion of the package names it says you have.

yum is relevant and as you saw it ran but said you already have have the packages.

What did you see when you ran the commands it suggested?
"systemctl status mysqld.service" and "journalctl -xe"

By the way adding -l to those commands will keep it from truncating lines in the output.

Also note that you ran "service" but it redirected to "systemctl". RHEL/CentOS went to systemd which uses systemctl starting with RHEL7/CentOS7.
 
Old 09-09-2016, 04:03 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,696

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
It does not appear that you installed the server.

yum install mysql-server

systemctl start mysqld
 
1 members found this post helpful.
Old 09-09-2016, 04:52 PM   #4
zillur
Member
 
Registered: Apr 2015
Posts: 217

Original Poster
Rep: Reputation: Disabled
Thank you very much your comments.
Code:
[root@genomics mysql]# yum install mysql-server
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.uprm.edu
 * epel: archive.linux.duke.edu
 * extras: mirrors.uprm.edu
 * updates: mirrors.uprm.edu
Package mysql-community-server-5.7.15-1.el7.x86_64 already installed and latest version
Nothing to do
Code:
[root@genomics mysql]# systemctl start mysqld
Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.
Code:
[root@genomics mysql]# systemctl status mysqld.service
● mysqld.service - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Fri 2016-09-09 17:48:55 EDT; 14s ago
  Process: 28814 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=1/FAILURE)
  Process: 28790 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)

Sep 09 17:48:55 genomics systemd[1]: Failed to start MySQL Server.
Sep 09 17:48:55 genomics systemd[1]: Unit mysqld.service entered failed state.
Sep 09 17:48:55 genomics systemd[1]: mysqld.service failed.
Sep 09 17:48:55 genomics systemd[1]: mysqld.service holdoff time over, scheduling restart.
Sep 09 17:48:55 genomics systemd[1]: start request repeated too quickly for mysqld.service
Sep 09 17:48:55 genomics systemd[1]: Failed to start MySQL Server.
Sep 09 17:48:55 genomics systemd[1]: Unit mysqld.service entered failed state.
Sep 09 17:48:55 genomics systemd[1]: mysqld.service failed.
Code:
[root@genomics mysql]# journalctl -xe
Sep 09 17:50:30 genomics sshd[29177]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Sep 09 17:50:31 genomics sshd[29177]: Failed password for root from 182.100.67.62 port 61170 ssh2
Sep 09 17:50:32 genomics unix_chkpwd[29182]: password check failed for user (root)
Sep 09 17:50:32 genomics sshd[29177]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Sep 09 17:50:34 genomics sshd[29177]: Failed password for root from 182.100.67.62 port 61170 ssh2
Sep 09 17:50:35 genomics unix_chkpwd[29183]: password check failed for user (root)
Sep 09 17:50:35 genomics sshd[29177]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Sep 09 17:50:37 genomics sshd[29177]: Failed password for root from 182.100.67.62 port 61170 ssh2
Sep 09 17:50:37 genomics unix_chkpwd[29184]: password check failed for user (root)
Sep 09 17:50:37 genomics sshd[29177]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Sep 09 17:50:39 genomics sshd[29177]: Failed password for root from 182.100.67.62 port 61170 ssh2
Sep 09 17:50:40 genomics unix_chkpwd[29185]: password check failed for user (root)
Sep 09 17:50:40 genomics sshd[29177]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Sep 09 17:50:42 genomics sshd[29177]: Failed password for root from 182.100.67.62 port 61170 ssh2
Sep 09 17:50:42 genomics sshd[29177]: Disconnecting: Too many authentication failures for root [preauth]
Sep 09 17:50:42 genomics sshd[29177]: PAM 5 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=182.100.67.62  user=root
Sep 09 17:50:42 genomics sshd[29177]: PAM service(sshd) ignoring max retries; 6 > 3
Sep 09 17:50:45 genomics unix_chkpwd[29188]: password check failed for user (root)
Sep 09 17:50:45 genomics sshd[29186]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=182.100.67.62  user=root
Sep 09 17:50:45 genomics sshd[29186]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Sep 09 17:50:47 genomics sshd[29186]: Failed password for root from 182.100.67.62 port 13906 ssh2
Sep 09 17:50:48 genomics unix_chkpwd[29189]: password check failed for user (root)
Sep 09 17:50:48 genomics sshd[29186]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Sep 09 17:50:50 genomics sshd[29186]: Failed password for root from 182.100.67.62 port 13906 ssh2
Sep 09 17:50:50 genomics unix_chkpwd[29190]: password check failed for user (root)
Sep 09 17:50:50 genomics sshd[29186]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Sep 09 17:50:53 genomics sshd[29186]: Failed password for root from 182.100.67.62 port 13906 ssh2
Sep 09 17:50:54 genomics unix_chkpwd[29191]: password check failed for user (root)
Sep 09 17:50:54 genomics sshd[29186]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Sep 09 17:50:56 genomics sshd[29186]: Failed password for root from 182.100.67.62 port 13906 ssh2
Sep 09 17:50:56 genomics unix_chkpwd[29192]: password check failed for user (root)
Sep 09 17:50:56 genomics sshd[29186]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Sep 09 17:50:58 genomics sshd[29186]: Failed password for root from 182.100.67.62 port 13906 ssh2
Sep 09 17:50:59 genomics unix_chkpwd[29201]: password check failed for user (root)
Sep 09 17:50:59 genomics sshd[29186]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root"
Sep 09 17:51:01 genomics sshd[29186]: Failed password for root from 182.100.67.62 port 13906 ssh2
Sep 09 17:51:01 genomics sshd[29186]: Disconnecting: Too many authentication failures for root [preauth]
Sep 09 17:51:01 genomics sshd[29186]: PAM 5 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=182.100.67.62  user=root
Sep 09 17:51:01 genomics sshd[29186]: PAM service(sshd) ignoring max retries; 6 > 3
Thanks again for your suggestions.

Best Regards
Zillur
 
Old 09-09-2016, 07:00 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,696

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
Look at the log files to see if you can see actually why mysql fails to start.
/var/log/messages

Is mariadb installed? If so is it running?
 
Old 09-09-2016, 07:46 PM   #6
zillur
Member
 
Registered: Apr 2015
Posts: 217

Original Poster
Rep: Reputation: Disabled
Thank you very much.

Code:
[root@genomics mysql]# yum install mariadb
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.uprm.edu
 * epel: archive.linux.duke.edu
 * extras: mirrors.uprm.edu
 * updates: mirrors.uprm.edu
Package 1:mariadb-5.5.50-1.el7_2.x86_64 is obsoleted by mysql-community-client-5.7.15-1.el7.x86_64 which is already installed
Nothing to do
Code:
[root@genomics mysql]# cat /var/log/messages | grep fail
Sep  7 11:14:24 genomics firefox.desktop: hashcompleter: notifying failure
Sep  7 11:23:35 genomics firefox.desktop: hashcompleter: notifying failure
Sep  9 15:57:47 genomics mysqld: 2016-09-09T19:57:47.447765Z 0 [ERROR] failed to set datadir to /home/zillur/Desktop/zillur/data/mysql/
Sep  9 15:57:47 genomics mysqld: Initialization of mysqld failed: 0
Sep  9 15:57:47 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 15:57:47 genomics systemd: mysqld.service failed.
Sep  9 15:57:48 genomics mysqld: 2016-09-09T19:57:48.554763Z 0 [ERROR] failed to set datadir to /home/zillur/Desktop/zillur/data/mysql/
Sep  9 15:57:48 genomics mysqld: Initialization of mysqld failed: 0
Sep  9 15:57:48 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 15:57:48 genomics systemd: mysqld.service failed.
Sep  9 15:57:49 genomics mysqld: 2016-09-09T19:57:49.685991Z 0 [ERROR] failed to set datadir to /home/zillur/Desktop/zillur/data/mysql/
Sep  9 15:57:49 genomics mysqld: Initialization of mysqld failed: 0
Sep  9 15:57:49 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 15:57:49 genomics systemd: mysqld.service failed.
Sep  9 15:57:50 genomics mysqld: 2016-09-09T19:57:50.760672Z 0 [ERROR] failed to set datadir to /home/zillur/Desktop/zillur/data/mysql/
Sep  9 15:57:50 genomics mysqld: Initialization of mysqld failed: 0
Sep  9 15:57:50 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 15:57:50 genomics systemd: mysqld.service failed.
Sep  9 15:57:51 genomics mysqld: 2016-09-09T19:57:51.717936Z 0 [ERROR] failed to set datadir to /home/zillur/Desktop/zillur/data/mysql/
Sep  9 15:57:51 genomics mysqld: Initialization of mysqld failed: 0
Sep  9 15:57:51 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 15:57:51 genomics systemd: mysqld.service failed.
Sep  9 15:57:51 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 15:57:51 genomics systemd: mysqld.service failed.
Sep  9 15:58:58 genomics mysqld: 2016-09-09T19:58:58.439017Z 0 [ERROR] failed to set datadir to /home/zillur/Desktop/zillur/data/mysql/
Sep  9 15:58:58 genomics mysqld: Initialization of mysqld failed: 0
Sep  9 15:58:58 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 15:58:58 genomics systemd: mysqld.service failed.
Sep  9 15:58:59 genomics mysqld: 2016-09-09T19:58:59.663741Z 0 [ERROR] failed to set datadir to /home/zillur/Desktop/zillur/data/mysql/
Sep  9 15:58:59 genomics mysqld: Initialization of mysqld failed: 0
Sep  9 15:58:59 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 15:58:59 genomics systemd: mysqld.service failed.
Sep  9 15:59:00 genomics mysqld: 2016-09-09T19:59:00.741957Z 0 [ERROR] failed to set datadir to /home/zillur/Desktop/zillur/data/mysql/
Sep  9 15:59:00 genomics mysqld: Initialization of mysqld failed: 0
Sep  9 15:59:00 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 15:59:00 genomics systemd: mysqld.service failed.
Sep  9 15:59:01 genomics mysqld: 2016-09-09T19:59:01.736792Z 0 [ERROR] failed to set datadir to /home/zillur/Desktop/zillur/data/mysql/
Sep  9 15:59:01 genomics mysqld: Initialization of mysqld failed: 0
Sep  9 15:59:01 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 15:59:01 genomics systemd: mysqld.service failed.
Sep  9 15:59:02 genomics mysqld: 2016-09-09T19:59:02.702870Z 0 [ERROR] failed to set datadir to /home/zillur/Desktop/zillur/data/mysql/
Sep  9 15:59:02 genomics mysqld: Initialization of mysqld failed: 0
Sep  9 15:59:02 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 15:59:02 genomics systemd: mysqld.service failed.
Sep  9 15:59:02 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 15:59:02 genomics systemd: mysqld.service failed.
Sep  9 16:11:54 genomics mysqld: 2016-09-09T20:11:54.476035Z 0 [ERROR] failed to set datadir to /home/zillur/Desktop/zillur/data/mysql/
Sep  9 16:11:54 genomics mysqld: Initialization of mysqld failed: 0
Sep  9 16:11:54 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 16:11:54 genomics systemd: mysqld.service failed.
Sep  9 16:11:55 genomics mysqld: 2016-09-09T20:11:55.688784Z 0 [ERROR] failed to set datadir to /home/zillur/Desktop/zillur/data/mysql/
Sep  9 16:11:55 genomics mysqld: Initialization of mysqld failed: 0
Sep  9 16:11:55 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 16:11:55 genomics systemd: mysqld.service failed.
Sep  9 16:11:56 genomics mysqld: 2016-09-09T20:11:56.755589Z 0 [ERROR] failed to set datadir to /home/zillur/Desktop/zillur/data/mysql/
Sep  9 16:11:56 genomics mysqld: Initialization of mysqld failed: 0
Sep  9 16:11:56 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 16:11:56 genomics systemd: mysqld.service failed.
Sep  9 16:11:57 genomics mysqld: 2016-09-09T20:11:57.692285Z 0 [ERROR] failed to set datadir to /home/zillur/Desktop/zillur/data/mysql/
Sep  9 16:11:57 genomics mysqld: Initialization of mysqld failed: 0
Sep  9 16:11:57 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 16:11:57 genomics systemd: mysqld.service failed.
Sep  9 16:11:58 genomics mysqld: 2016-09-09T20:11:58.759246Z 0 [ERROR] failed to set datadir to /home/zillur/Desktop/zillur/data/mysql/
Sep  9 16:11:58 genomics mysqld: Initialization of mysqld failed: 0
Sep  9 16:11:58 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 16:11:58 genomics systemd: mysqld.service failed.
Sep  9 16:11:58 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 16:11:58 genomics systemd: mysqld.service failed.
Sep  9 16:13:29 genomics mysqld: 2016-09-09T20:13:29.436273Z 0 [ERROR] failed to set datadir to /home/zillur/Desktop/zillur/data/mysql/
Sep  9 16:13:29 genomics mysqld: Initialization of mysqld failed: 0
Sep  9 16:13:29 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 16:13:29 genomics systemd: mysqld.service failed.
Sep  9 16:13:30 genomics mysqld: 2016-09-09T20:13:30.693643Z 0 [ERROR] failed to set datadir to /home/zillur/Desktop/zillur/data/mysql/
Sep  9 16:13:30 genomics mysqld: Initialization of mysqld failed: 0
Sep  9 16:13:30 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 16:13:30 genomics systemd: mysqld.service failed.
Sep  9 16:13:31 genomics mysqld: 2016-09-09T20:13:31.771050Z 0 [ERROR] failed to set datadir to /home/zillur/Desktop/zillur/data/mysql/
Sep  9 16:13:31 genomics mysqld: Initialization of mysqld failed: 0
Sep  9 16:13:31 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 16:13:31 genomics systemd: mysqld.service failed.
Sep  9 16:13:32 genomics mysqld: 2016-09-09T20:13:32.661423Z 0 [ERROR] failed to set datadir to /home/zillur/Desktop/zillur/data/mysql/
Sep  9 16:13:32 genomics mysqld: Initialization of mysqld failed: 0
Sep  9 16:13:32 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 16:13:32 genomics systemd: mysqld.service failed.
Sep  9 16:13:33 genomics mysqld: 2016-09-09T20:13:33.970788Z 0 [ERROR] failed to set datadir to /home/zillur/Desktop/zillur/data/mysql/
Sep  9 16:13:33 genomics mysqld: Initialization of mysqld failed: 0
Sep  9 16:13:33 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 16:13:33 genomics systemd: mysqld.service failed.
Sep  9 16:13:34 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 16:13:34 genomics systemd: mysqld.service failed.
Sep  9 16:19:05 genomics mysqld: 2016-09-09T20:19:05.853656Z 0 [ERROR] failed to set datadir to /home/zillur/Desktop/zillur/data/mysql/
Sep  9 16:19:05 genomics mysqld: Initialization of mysqld failed: 0
Sep  9 16:19:05 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 16:19:05 genomics systemd: mysqld.service failed.
Sep  9 16:19:07 genomics mysqld: 2016-09-09T20:19:07.013061Z 0 [ERROR] failed to set datadir to /home/zillur/Desktop/zillur/data/mysql/
Sep  9 16:19:07 genomics mysqld: Initialization of mysqld failed: 0
Sep  9 16:19:07 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 16:19:07 genomics systemd: mysqld.service failed.
Sep  9 16:19:08 genomics mysqld: 2016-09-09T20:19:08.016040Z 0 [ERROR] failed to set datadir to /home/zillur/Desktop/zillur/data/mysql/
Sep  9 16:19:08 genomics mysqld: Initialization of mysqld failed: 0
Sep  9 16:19:08 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 16:19:08 genomics systemd: mysqld.service failed.
Sep  9 16:19:09 genomics mysqld: 2016-09-09T20:19:09.028477Z 0 [ERROR] failed to set datadir to /home/zillur/Desktop/zillur/data/mysql/
Sep  9 16:19:09 genomics mysqld: Initialization of mysqld failed: 0
Sep  9 16:19:09 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 16:19:09 genomics systemd: mysqld.service failed.
Sep  9 16:19:10 genomics mysqld: 2016-09-09T20:19:10.033584Z 0 [ERROR] failed to set datadir to /home/zillur/Desktop/zillur/data/mysql/
Sep  9 16:19:10 genomics mysqld: Initialization of mysqld failed: 0
Sep  9 16:19:10 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 16:19:10 genomics systemd: mysqld.service failed.
Sep  9 16:19:10 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 16:19:10 genomics systemd: mysqld.service failed.
Sep  9 17:48:51 genomics mysqld: 2016-09-09T21:48:51.054648Z 0 [ERROR] failed to set datadir to /home/zillur/Desktop/zillur/data/mysql/
Sep  9 17:48:51 genomics mysqld: Initialization of mysqld failed: 0
Sep  9 17:48:51 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 17:48:51 genomics systemd: mysqld.service failed.
Sep  9 17:48:52 genomics mysqld: 2016-09-09T21:48:52.202601Z 0 [ERROR] failed to set datadir to /home/zillur/Desktop/zillur/data/mysql/
Sep  9 17:48:52 genomics mysqld: Initialization of mysqld failed: 0
Sep  9 17:48:52 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 17:48:52 genomics systemd: mysqld.service failed.
Sep  9 17:48:53 genomics mysqld: 2016-09-09T21:48:53.230627Z 0 [ERROR] failed to set datadir to /home/zillur/Desktop/zillur/data/mysql/
Sep  9 17:48:53 genomics mysqld: Initialization of mysqld failed: 0
Sep  9 17:48:53 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 17:48:53 genomics systemd: mysqld.service failed.
Sep  9 17:48:54 genomics mysqld: 2016-09-09T21:48:54.283633Z 0 [ERROR] failed to set datadir to /home/zillur/Desktop/zillur/data/mysql/
Sep  9 17:48:54 genomics mysqld: Initialization of mysqld failed: 0
Sep  9 17:48:54 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 17:48:54 genomics systemd: mysqld.service failed.
Sep  9 17:48:55 genomics mysqld: 2016-09-09T21:48:55.503893Z 0 [ERROR] failed to set datadir to /home/zillur/Desktop/zillur/data/mysql/
Sep  9 17:48:55 genomics mysqld: Initialization of mysqld failed: 0
Sep  9 17:48:55 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 17:48:55 genomics systemd: mysqld.service failed.
Sep  9 17:48:55 genomics systemd: Unit mysqld.service entered failed state.
Sep  9 17:48:55 genomics systemd: mysqld.service failed.
 
Old 09-09-2016, 09:21 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,696

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
Did you try to start mysql before changing the datadir location?
Why did you change the datadir?

Is /home/zillur/Desktop/zillur/data/mysql/ a valid directory?
Did you move the database files in /var/lib/mysql directory to /home/zillur/Desktop/zillur/data/mysql?
Does the /home/zillur/Desktop/zillur/data/mysql if it exists have the correct permissions?
Did you change selinux to switch from /var/lib/mysql to /home/zillur/Desktop/zillur/data/mysql?
 
Old 09-10-2016, 05:02 PM   #8
zillur
Member
 
Registered: Apr 2015
Posts: 217

Original Poster
Rep: Reputation: Disabled
Thank you very much for your comment. I think I have permission problem. How can I give specific permissions.
Code:
[zillur@genomics zillur]$ cd data/
[zillur@genomics data]$ ls
mysql
[zillur@genomics data]$ cd mysql/
[zillur@genomics mysql]$ ls
ls: cannot open directory .: Permission denied
[zillur@genomics mysql]$ sudo ls -l
[sudo] password for zillur: 
total 4
drwxrwxrwx. 5 mysql mysql 4096 Sep  1 17:45 mysql
[zillur@genomics mysql]$ sudo ls -alZ
drwxr-x--x. mysql  mysql  unconfined_u:object_r:user_home_t:s0 .
drwxrwxr-x. zillur zillur unconfined_u:object_r:user_home_t:s0 ..
drwxrwxrwx. mysql  mysql  system_u:object_r:mysqld_db_t:s0 mysql
[zillur@genomics mysql]$ su
Password: 
[root@genomics mysql]# ls
mysql
[root@genomics mysql]# cd mysql/
[root@genomics mysql]# ls
auto.cnf  ib_buffer_pool  ibdata1  ib_logfile0  ib_logfile1  mysql  mysql.sock  performance_schema  sys
[root@genomics mysql]# cd mysql/
I think I have the files:
Code:
[root@genomics mysql]# cd mysql/
[root@genomics mysql]# ls
auto.cnf  ib_buffer_pool  ibdata1  ib_logfile0  ib_logfile1  mysql  mysql.sock  performance_schema  sys
[root@genomics mysql]# cd mysql/
[root@genomics mysql]# ls
columns_priv.frm  event.MYI          help_keyword.frm        ndb_binlog_index.MYD  proxies_priv.MYD          slave_worker_info.ibd      time_zone_name.frm
columns_priv.MYD  func.frm           help_keyword.ibd        ndb_binlog_index.MYI  proxies_priv.MYI          slow_log.CSM               time_zone_name.ibd
columns_priv.MYI  func.MYD           help_relation.frm       plugin.frm            server_cost.frm           slow_log.CSV               time_zone_transition.frm
db.frm            func.MYI           help_relation.ibd       plugin.ibd            server_cost.ibd           slow_log.frm               time_zone_transition.ibd
db.MYD            general_log.CSM    help_topic.frm          proc.frm              servers.frm               tables_priv.frm            time_zone_transition_type.frm
db.MYI            general_log.CSV    help_topic.ibd          proc.MYD              servers.ibd               tables_priv.MYD            time_zone_transition_type.ibd
db.opt            general_log.frm    innodb_index_stats.frm  proc.MYI              slave_master_info.frm     tables_priv.MYI            user.frm
engine_cost.frm   gtid_executed.frm  innodb_index_stats.ibd  procs_priv.frm        slave_master_info.ibd     time_zone.frm              user.MYD
engine_cost.ibd   gtid_executed.ibd  innodb_table_stats.frm  procs_priv.MYD        slave_relay_log_info.frm  time_zone.ibd              user.MYI
event.frm         help_category.frm  innodb_table_stats.ibd  procs_priv.MYI        slave_relay_log_info.ibd  time_zone_leap_second.frm
event.MYD         help_category.ibd  ndb_binlog_index.frm    proxies_priv.frm      slave_worker_info.frm     time_zone_leap_second.ibd
[root@genomics mysql]# pwd
/home/zillur/Desktop/zillur/data/mysql/mysql/mysql
[root@genomics mysql]# cd ..
[root@genomics mysql]# ls
auto.cnf  ib_buffer_pool  ibdata1  ib_logfile0  ib_logfile1  mysql  mysql.sock  performance_schema  sys
[root@genomics mysql]# pwd
/home/zillur/Desktop/zillur/data/mysql/mysql
[root@genomics mysql]# cd ..
[root@genomics mysql]# ls
mysql
[root@genomics mysql]# pwd
/home/zillur/Desktop/zillur/data/mysql
[root@genomics mysql]# cd ../
[root@genomics data]# ls
mysql
[root@genomics data]# cd /var/lib/mysql
[root@genomics mysql]# ls
auto.cnf  ib_buffer_pool  ibdata1  ib_logfile0  ib_logfile1  mysql  mysql.sock  performance_schema  sys
[root@genomics mysql]# pwd
/var/lib/mysql
[root@genomics mysql]# cd mysql/
[root@genomics mysql]# ls
columns_priv.frm  event.MYI          help_keyword.frm        ndb_binlog_index.MYD  proxies_priv.MYD          slave_worker_info.ibd      time_zone_name.frm
columns_priv.MYD  func.frm           help_keyword.ibd        ndb_binlog_index.MYI  proxies_priv.MYI          slow_log.CSM               time_zone_name.ibd
columns_priv.MYI  func.MYD           help_relation.frm       plugin.frm            server_cost.frm           slow_log.CSV               time_zone_transition.frm
db.frm            func.MYI           help_relation.ibd       plugin.ibd            server_cost.ibd           slow_log.frm               time_zone_transition.ibd
db.MYD            general_log.CSM    help_topic.frm          proc.frm              servers.frm               tables_priv.frm            time_zone_transition_type.frm
db.MYI            general_log.CSV    help_topic.ibd          proc.MYD              servers.ibd               tables_priv.MYD            time_zone_transition_type.ibd
db.opt            general_log.frm    innodb_index_stats.frm  proc.MYI              slave_master_info.frm     tables_priv.MYI            user.frm
engine_cost.frm   gtid_executed.frm  innodb_index_stats.ibd  procs_priv.frm        slave_master_info.ibd     time_zone.frm              user.MYD
engine_cost.ibd   gtid_executed.ibd  innodb_table_stats.frm  procs_priv.MYD        slave_relay_log_info.frm  time_zone.ibd              user.MYI
event.frm         help_category.frm  innodb_table_stats.ibd  procs_priv.MYI        slave_relay_log_info.ibd  time_zone_leap_second.frm
event.MYD         help_category.ibd  ndb_binlog_index.frm    proxies_priv.frm      slave_worker_info.frm     time_zone_leap_second.ibd
[root@genomics mysql]# pwd
/var/lib/mysql/mysql
PHP Code:
Did you change selinux to switch from /var/lib/mysql to /home/zillur/Desktop/zillur/data/mysql
How can I change the switch?

Best Regards
Zillur
 
Old 09-10-2016, 10:09 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,696

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
The server mysqld runs as the mysql system user which does not have permissions to access your user home directory /home/zillur. Why do you want to change the datadir?
 
Old 09-11-2016, 01:42 PM   #10
zillur
Member
 
Registered: Apr 2015
Posts: 217

Original Poster
Rep: Reputation: Disabled
Thank you very much. This directory has more space. If I don't change the directory the problem is same. If I run mysql as root, still the problem persists. What should I do now? How can I give permission to mysql system user to access /home/zillur or any directory?

Best Regards
Zillur
 
Old 09-11-2016, 02:24 PM   #11
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
I highly, highly, Highly suggest you leave mysql where it is installs to, /var/lib/mysql
 
Old 09-11-2016, 02:37 PM   #12
zillur
Member
 
Registered: Apr 2015
Posts: 217

Original Poster
Rep: Reputation: Disabled
Thank you very much for your reply. I can do that. But still I don't have permission to open /var/lib/mysql.
Code:
Last login: Sat Sep 10 17:39:37 2016 from 136.145.182.28
[zillur@genomics ~]$ cd /var/lib/mysql
[zillur@genomics mysql]$ ls
ls: cannot open directory .: Permission denied
[zillur@genomics mysql]$ pwd
/var/lib/mysql
What should I do now?

Best Regards
Zillur
 
Old 09-11-2016, 03:13 PM   #13
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,696

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
A regular user does not need permissions to access the /var/lib/mysql directory. From your previous posts it seems like the original files still exist.

Change your /etc/my.cnf file so the datadir=/var/lib/mysql and see if mysqld starts.

You might have to delete mysql.sock before it will start.

Last edited by michaelk; 09-11-2016 at 03:19 PM.
 
Old 09-11-2016, 03:23 PM   #14
zillur
Member
 
Registered: Apr 2015
Posts: 217

Original Poster
Rep: Reputation: Disabled
Thank you very much. I have changed the my.cnf file in /etc.
Code:
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html

[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
innodb_buffer_pool_size = 128G
#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
join_buffer_size = 128000M
sort_buffer_size = 2000M
read_rnd_buffer_size = 2000M
datadir=/var/lib/mysql/
socket=/var/lib/mysql/mysql.sock
explicit_defaults_for_timestamp=1
innodb_force_recovery = 1
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
Then it asked my user password. After password I got this:

Code:
[zillur@genomics etc]$ systemctl start mysqld
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to manage system services or units.
Authenticating as: Zillur (zillur)
Password: 
==== AUTHENTICATION COMPLETE ===
Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.
[zillur@genomics etc]$ systemctl status mysqld.service
● mysqld.service - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Sun 2016-09-11 16:19:28 EDT; 13s ago
  Process: 9197 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=1/FAILURE)
  Process: 9172 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)

Sep 11 16:19:28 genomics systemd[1]: Failed to start MySQL Server.
Sep 11 16:19:28 genomics systemd[1]: Unit mysqld.service entered failed state.
Sep 11 16:19:28 genomics systemd[1]: mysqld.service failed.
Sep 11 16:19:28 genomics systemd[1]: mysqld.service holdoff time over, scheduling restart.
Sep 11 16:19:28 genomics systemd[1]: start request repeated too quickly for mysqld.service
Sep 11 16:19:28 genomics systemd[1]: Failed to start MySQL Server.
Sep 11 16:19:28 genomics systemd[1]: Unit mysqld.service entered failed state.
Sep 11 16:19:28 genomics systemd[1]: mysqld.service failed.
Thanks again. I think I am missing something maybe.

Best Regards
Zillur
 
Old 09-11-2016, 03:30 PM   #15
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,696

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
Look at the /var/log/messages.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ns2.29.3 installation on fedora 15 , nam installation problem Narges Linux - Networking 5 10-31-2011 11:09 AM
PXE installation problem - can only select A series packages for installation Nylex Slackware 4 08-19-2010 02:15 PM
Installation of Binutils(configure:error:installation or configuration problem:C ...) h_r0019 Linux From Scratch 1 05-05-2007 07:40 AM
Redhat/Linux Installation Support??? Is It Red hat installation problem??? wanux Red Hat 1 08-01-2006 10:32 PM
LiLo Installation problem ?and (GNOME and KDE problem) hitesh_linux Linux - Software 1 01-01-2002 04:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration