LinuxQuestions.org
Help answer threads with 0 replies.
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-11-2016, 04:36 PM   #16
zillur
Member
 
Registered: Apr 2015
Posts: 188

Original Poster
Rep: Reputation: Disabled

Thank you very much. Here it is:

Best Regards
Zillur
Attached Files
File Type: txt mysql.mssg.txt (61.9 KB, 14 views)

Last edited by zillur; 09-11-2016 at 04:41 PM.
 
Old 09-11-2016, 07:20 PM   #17
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 5,388

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Quote:
Originally Posted by zillur View Post
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
Wow, these settings are huge values!

Are you sure of your settings ? How much ram available in server specs?
 
Old 09-12-2016, 09:37 AM   #18
zillur
Member
 
Registered: Apr 2015
Posts: 188

Original Poster
Rep: Reputation: Disabled
Thank you very much for your comment. I have 172GB ram. However if I put lower values there like:
Code:
zillur@genomics etc]$ more my.cnf
# 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 = 28G
#
# 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 = 12800M
sort_buffer_size = 200M
read_rnd_buffer_size = 200M
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
It doesn't do anything. The problem is still same:
Code:
[zillur@genomics gsl-2.2.1]$ 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.
[zillur@genomics gsl-2.2.1]$ 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 Mon 2016-09-12 09:32:34 EDT; 13s ago
  Process: 28389 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=1/FAILURE)
  Process: 28365 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)

Sep 12 09:32:34 genomics systemd[1]: Failed to start MySQL Server.
Sep 12 09:32:34 genomics systemd[1]: Unit mysqld.service entered failed state.
Sep 12 09:32:34 genomics systemd[1]: mysqld.service failed.
Sep 12 09:32:34 genomics systemd[1]: mysqld.service holdoff time over, scheduling restart.
Sep 12 09:32:34 genomics systemd[1]: start request repeated too quickly for mysqld.service
Sep 12 09:32:34 genomics systemd[1]: Failed to start MySQL Server.
Sep 12 09:32:34 genomics systemd[1]: Unit mysqld.service entered failed state.
Sep 12 09:32:34 genomics systemd[1]: mysqld.service failed.
Waiting for your suggestions.

Best Regards
Zillur
 
Old 09-12-2016, 12:21 PM   #19
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 5,388

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Did you notice these lines in your mysql.mssg.txt file?
Code:
mysqld: Can't change dir to '/home/zillur/Desktop/zillur/data/mysql/' (Errcode: 13 - Permission denied)
Setting a dir inside your home is not recommended (you will have to change permissions in /home/zillur)

Why not create /home/mysql and ' chown mysql:mysql /home/mysql '
Then use

datadir=/home/mysql
socket=/home/mysql/mysql.sock

in my.cnf

edit: prior to start mysql, you may need to run:
Code:
mysql_install_db --datadir=/home/mysql

Last edited by keefaz; 09-12-2016 at 12:33 PM.
 
Old 09-12-2016, 03:10 PM   #20
zillur
Member
 
Registered: Apr 2015
Posts: 188

Original Poster
Rep: Reputation: Disabled
Thank you very much. I have changed the directory. But it doesn't do anything:
Code:
[zillur@genomics etc]$ sudo more my.cnf
[sudo] password for zillur: 
# 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 = 28G
#
# 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 = 128M
sort_buffer_size = 20M
read_rnd_buffer_size = 20M
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
and:
Code:
[zillur@genomics etc]$ journalctl -xe
Sep 12 15:09:06 genomics mysqld[15444]: 2016-09-12T19:09:06.990391Z 0 [Note] Binlog end
Sep 12 15:09:06 genomics mysqld[15444]: 2016-09-12T19:09:06.990451Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
Sep 12 15:09:06 genomics systemd[1]: mysqld.service: control process exited, code=exited status=1
Sep 12 15:09:06 genomics mysqld[15444]: Initialization of mysqld failed: 0
Sep 12 15:09:06 genomics systemd[1]: Failed to start MySQL Server.
-- Subject: Unit mysqld.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit mysqld.service has failed.
-- 
-- The result is failed.
Sep 12 15:09:06 genomics systemd[1]: Unit mysqld.service entered failed state.
Sep 12 15:09:06 genomics systemd[1]: mysqld.service failed.
Sep 12 15:09:07 genomics systemd[1]: mysqld.service holdoff time over, scheduling restart.
Sep 12 15:09:07 genomics systemd[1]: Starting MySQL Server...
-- Subject: Unit mysqld.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit mysqld.service has begun starting up.
Sep 12 15:09:08 genomics mysqld[15472]: 2016-09-12T19:09:08.017175Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.15-log) starting as process 15474 ...
Sep 12 15:09:08 genomics mysqld[15472]: 2016-09-12T19:09:08.019079Z 0 [ERROR] You have enabled the binary log, but you haven't provided the mandatory server-id. Please refer to th
Sep 12 15:09:08 genomics mysqld[15472]: 2016-09-12T19:09:08.019103Z 0 [ERROR] Aborting
Sep 12 15:09:08 genomics mysqld[15472]: 2016-09-12T19:09:08.019142Z 0 [Note] Binlog end
Sep 12 15:09:08 genomics mysqld[15472]: 2016-09-12T19:09:08.019203Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
Sep 12 15:09:08 genomics systemd[1]: mysqld.service: control process exited, code=exited status=1
Sep 12 15:09:08 genomics mysqld[15472]: Initialization of mysqld failed: 0
Sep 12 15:09:08 genomics systemd[1]: Failed to start MySQL Server.
-- Subject: Unit mysqld.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit mysqld.service has failed.
-- 
-- The result is failed.
Sep 12 15:09:08 genomics systemd[1]: Unit mysqld.service entered failed state.
Sep 12 15:09:08 genomics systemd[1]: mysqld.service failed.
Sep 12 15:09:08 genomics systemd[1]: mysqld.service holdoff time over, scheduling restart.
Sep 12 15:09:08 genomics systemd[1]: start request repeated too quickly for mysqld.service
Sep 12 15:09:08 genomics systemd[1]: Failed to start MySQL Server.
-- Subject: Unit mysqld.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit mysqld.service has failed.
-- 
-- The result is failed.
Sep 12 15:09:08 genomics systemd[1]: Unit mysqld.service entered failed state.
Sep 12 15:09:08 genomics systemd[1]: mysqld.service failed.
What should I do now?

Best Regards
Zillur
 
Old 09-12-2016, 04:50 PM   #21
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 5,388

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Quote:
Originally Posted by journalctl -xe
Sep 12 15:09:08 genomics mysqld[15472]: 2016-09-12T19:09:08.019079Z 0 [ERROR] You have enabled the binary log, but you haven't provided the mandatory server-id. Please refer to
I don't know how systemd starts mysqld, I know only rc script on my OS (Slackware)

From quick look in doc:
https://dev.mysql.com/doc/refman/5.7...g-systemd.html

I would try (temporarly) :
Code:
systemctl set-environment MYSQLD_OPTS="--server-id=1"
systemctl start mysqld
Edit:
Or maybe just add ' server-id = 1 ' in my.cnf just below ' log_bin ' line

Edit2:
it's ' server_id = 1 ' in conf

https://dev.mysql.com/doc/refman/5.7...svar_server_id

Last edited by keefaz; 09-12-2016 at 05:14 PM.
 
Old 09-13-2016, 11:07 AM   #22
zillur
Member
 
Registered: Apr 2015
Posts: 188

Original Poster
Rep: Reputation: Disabled
Thank you very much. After editing, now mysqld is active. But, when
Code:
systemctl start mysqld
It just doesn't do anything, ask a password and then nothing.
Code:
[zillur@genomics mysql]$ systemctl status mysqld
● mysqld.service - MySQL Server
   Loaded: loaded (/etc/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2016-09-12 20:37:19 EDT; 14h ago
  Process: 3676 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)
  Process: 3653 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
 Main PID: 3678 (mysqld)
   CGroup: /system.slice/mysqld.service
           └─3678 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid

Sep 12 20:37:15 genomics systemd[1]: Starting MySQL Server...
Sep 12 20:37:19 genomics systemd[1]: Started MySQL Server.
[zillur@genomics mysql]$ systemctl start mysqld
I ran "mysqld_safe" yesterday but it's still running!!!
Code:
[zillur@genomics mysql-5.6.21-linux-glibc2.5-x86_64]$ bin/mysqld_safe --user=mysql &
[1] 6542
[zillur@genomics mysql-5.6.21-linux-glibc2.5-x86_64]$ Warning: World-writable config file '/usr/local/mysql-5.6.21-linux-glibc2.5-x86_64/my.cnf' is ignored
Warning: World-writable config file '/usr/local/mysql-5.6.21-linux-glibc2.5-x86_64/my.cnf' is ignored
160912 20:59:48 mysqld_safe Logging to '/var/log/mysqld.log'.
160912 20:59:48 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql/
160912 20:59:48 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
What should I do now?

Best Regards
Zillur

Last edited by zillur; 09-13-2016 at 11:14 AM.
 
Old 09-13-2016, 12:05 PM   #23
michaelk
Moderator
 
Registered: Aug 2002
Posts: 15,252

Rep: Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624Reputation: 1624
mysqld is a server similar to other services already running. To interact you can use the command line tool mysql or one of several GUI applications.

To start run mysql_secure_installation to configure mysql and then you can login as the mysql root user using
mysql -u root -p

Last edited by michaelk; 09-13-2016 at 12:25 PM.
 
1 members found this post helpful.
Old 09-13-2016, 12:27 PM   #24
zillur
Member
 
Registered: Apr 2015
Posts: 188

Original Poster
Rep: Reputation: Disabled
Thank you very much. I have tried, but when I give password for root it give me error message same as if I don't use the password.
Code:
[zillur@genomics Main]$ mysql_secure_installation

Securing the MySQL server deployment.

Enter password for user root: 
Error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[zillur@genomics Main]$ mysql_secure_installation

Securing the MySQL server deployment.

Enter password for user root: 
Error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[zillur@genomics Main]$ mysqld
[zillur@genomics Main]$ mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
What should I do now?

Best Regards
Zillur
 
Old 09-13-2016, 12:42 PM   #25
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 5,388

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Can you show output with
Code:
ls -l /var/lib/mysql
 
Old 09-13-2016, 12:44 PM   #26
zillur
Member
 
Registered: Apr 2015
Posts: 188

Original Poster
Rep: Reputation: Disabled
Thank you. Here it is:
Code:
[zillur@genomics mysql]$ ls -l /var/lib/mysql
total 122944
-rwxrwxrwx. 1 mysql  mysql        56 Sep 12 20:37 auto.cnf
-rwxrwxrwx. 1 mysql  mysql       177 Sep 12 17:34 genomics-bin.000001
-rwxrwxrwx. 1 mysql  mysql       177 Sep 12 20:37 genomics-bin.000002
-rwxrwxrwx. 1 mysql  mysql       154 Sep 12 20:37 genomics-bin.000003
-rwxrwxrwx. 1 mysql  mysql        66 Sep 12 20:37 genomics-bin.index
-rwxrwxrwx. 1 mysql  mysql       320 Sep 12 20:37 ib_buffer_pool
-rwxrwxrwx. 1 mysql  mysql  12582912 Sep 12 20:37 ibdata1
-rwxrwxrwx. 1 mysql  mysql  50331648 Sep 12 20:37 ib_logfile0
-rwxrwxrwx. 1 mysql  mysql  50331648 Aug 31 19:18 ib_logfile1
-rwxrwxrwx. 1 mysql  mysql  12582912 Sep 12 20:37 ibtmp1
drwxrwxrwx. 2 mysql  mysql      4096 Sep 11 16:39 mysql
-rwxrwxrwx. 1 zillur zillur      842 Sep 12 19:51 mysql.cnf
-rw-rw----. 1 zillur zillur        0 Sep 12 20:59 mysqld-bin.index
-rwxrwxrwx. 1 mysql  mysql         5 Sep 12 20:37 mysql.sock.lock
drwxrwxrwx. 2 mysql  mysql      8192 Aug 31 19:18 performance_schema
drwxrwxrwx. 2 mysql  mysql      8192 Aug 31 19:18 sys
-rwxrwxrwx. 1 zillur zillur       40 Sep 12 19:57 whatever.stderr
-rwxrwxrwx. 1 zillur zillur        0 Sep 12 19:57 whatever.stdout
 
Old 09-13-2016, 01:06 PM   #27
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 5,388

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Permissions look too "permissive"
do:
Code:
find /var/lib/mysql -type f | xargs chmod 0660
find /var/lib/mysql -type f | xargs chown mysql:mysql
 
Old 09-13-2016, 01:33 PM   #28
zillur
Member
 
Registered: Apr 2015
Posts: 188

Original Poster
Rep: Reputation: Disabled
Thank you. After
Quote:
find /var/lib/mysql -type f | xargs chmod 0660
find /var/lib/mysql -type f | xargs chown mysql:mysql
I got:
Code:
[zillur@genomics mysql]$ ls -la
total 122956
drwxrwxrwx.  5 mysql mysql     4096 Sep 13 13:28 .
drwxrwxrwx. 79 root  root      4096 Sep 13 03:29 ..
-rw-rw----.  1 mysql mysql       56 Sep 12 20:37 auto.cnf
-rw-rw----.  1 mysql mysql      177 Sep 12 17:34 genomics-bin.000001
-rw-rw----.  1 mysql mysql      177 Sep 12 20:37 genomics-bin.000002
-rw-rw----.  1 mysql mysql      154 Sep 12 20:37 genomics-bin.000003
-rw-rw----.  1 mysql mysql       66 Sep 12 20:37 genomics-bin.index
-rw-rw----.  1 mysql mysql      320 Sep 12 20:37 ib_buffer_pool
-rw-rw----.  1 mysql mysql 12582912 Sep 12 20:37 ibdata1
-rw-rw----.  1 mysql mysql 50331648 Sep 12 20:37 ib_logfile0
-rw-rw----.  1 mysql mysql 50331648 Aug 31 19:18 ib_logfile1
-rw-rw----.  1 mysql mysql 12582912 Sep 12 20:37 ibtmp1
drwxrwxrwx.  2 mysql mysql     4096 Sep 11 16:39 mysql
-rw-rw----.  1 mysql mysql      842 Sep 12 19:51 mysql.cnf
-rw-rw----.  1 mysql mysql        0 Sep 12 20:59 mysqld-bin.index
-rw-rw----.  1 mysql mysql        5 Sep 12 20:37 mysql.sock.lock
drwxrwxrwx.  2 mysql mysql     8192 Aug 31 19:18 performance_schema
-rw-rw----.  1 mysql mysql     1024 Sep  1 17:45 .rnd
drwxrwxrwx.  2 mysql mysql     8192 Aug 31 19:18 sys
-rw-rw----.  1 mysql mysql       40 Sep 12 19:57 whatever.stderr
-rw-rw----.  1 mysql mysql        0 Sep 12 19:57 whatever.stdout
But still the problem persists:
Code:
[zillur@genomics mysql]$ mysql_secure_installation

Securing the MySQL server deployment.

Enter password for user root: 
Error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[zillur@genomics mysql]$ mysqld
What should I do now? Thank you again for your help.

Best Regards
Zillur
 
Old 09-13-2016, 01:37 PM   #29
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 5,388

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Did you change
socket=/var/lib/mysql/mysql.sock
in /etc/my.cnf ?

Could you post output with
Code:
ls -l /var/run/mysqld
 
Old 09-13-2016, 01:39 PM   #30
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 5,388

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Also, you need to fix the directories permissions as well in /var/lib/mysql
Code:
find /var/lib/mysql -type d | xargs chmod 0700
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 12:09 PM
PXE installation problem - can only select A series packages for installation Nylex Slackware 4 08-19-2010 03:15 PM
Installation of Binutils(configure:error:installation or configuration problem:C ...) h_r0019 Linux From Scratch 1 05-05-2007 08:40 AM
Redhat/Linux Installation Support??? Is It Red hat installation problem??? wanux Red Hat 1 08-01-2006 11:32 PM
LiLo Installation problem ?and (GNOME and KDE problem) hitesh_linux Linux - Software 1 01-01-2002 05:56 AM


All times are GMT -5. The time now is 07:58 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration