LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-22-2010, 11:41 AM   #1
simonchapman_q
LQ Newbie
 
Registered: Sep 2010
Location: gravesend
Distribution: redhat, centos, fedora
Posts: 5

Rep: Reputation: 0
problem with MySQL?!


for some reason, which I have exhausted all my thoughts upon..

I have mysql 5.0.77

I just made an amendment to the auto_increment_increment variable.. from 10 to 1

Gone to restart mysqld (im on redhat FYI) and get the error:

'Timeout error occurred trying to start MySQL Daemon.'

It fails to stop, and obviously fails to start.

I have included below my 'my.cnf' file but I cant see any issues with it, and can't for the life of me think why there is something wrong.

If I ever come across an issue, I don't tend to ask but instead try and figure it out (usually with success) but this time.. I just cannot get my head around it..

Please help :S thanks.

---------------------------
[client]
user = root
password = ******
socket = /var/lib/mysql1/mysql.sock

[mysqld]

[mysqldump]
user = root
password = ******
socket = /var/lib/mysql2/mysql.sock

[mysqld_multi]
mysqld = /usr/bin/mysqld_safe
mysqladmin = /usr/bin/mysqladmin
user = replication
password = ******

[mysqld1]
max_connections = 300
datadir = /var/lib/mysql1
socket = /var/lib/mysql1/mysql.sock
pid-file = /var/run/mysqld1/mysqld1.pid
user = mysql
port = 3306
server-id = 1
log-bin = mysql-bin
log-error = /var/log/mysqld1.log
auto_increment_increment = 1
auto_increment_offset = 1
binlog-ignore-db = mysql # input the database that should be ignored for replication
binlog-ignore-db = test

[mysqld2]
server-id = 2
datadir = /var/lib/mysql2
socket = /var/lib/mysql2/mysql.sock
relay-log = mysqld2-relay-bin
pid-file = /var/run/mysqld2/mysqld2.pid
user = mysql
port = 3307
log-error = /var/log/mysqld2.log
master-host = localhost
master_user = replication
master-password = *****
master-port = 3306
#skip-slave-start

[mysqld3]
server-id = 3
datadir = /var/lib/mysql3
socket = /var/lib/mysql3/mysql.sock
relay-log = mysqld3-relay-bin
pid-file = /var/run/mysqld3/mysqld3.pid
user = mysql
port = 3308
log-error = /var/log/mysqld3.log
master-host = localhost
master_user = replication
master-password = *****
master-port = 3306
#skip-slave-start

----------------------------------------------
 
Old 09-23-2010, 03:22 AM   #2
simonchapman_q
LQ Newbie
 
Registered: Sep 2010
Location: gravesend
Distribution: redhat, centos, fedora
Posts: 5

Original Poster
Rep: Reputation: 0
anyone? pleaseeee :/
 
Old 09-23-2010, 03:36 AM   #3
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: RHEL/Ubuntu/Debian/Fedora/Centos/K3OS
Posts: 1,153
Blog Entries: 4

Rep: Reputation: 147Reputation: 147
you using replication?

and try changing it back to 1

don't mind but why was it changed form 1 to 10 ?
 
Old 09-24-2010, 03:20 AM   #4
simonchapman_q
LQ Newbie
 
Registered: Sep 2010
Location: gravesend
Distribution: redhat, centos, fedora
Posts: 5

Original Poster
Rep: Reputation: 0
Will give that a go.. the answer to that is unknown, the system admin prior to me set that part up
 
Old 09-24-2010, 03:46 AM   #5
mardi
LQ Newbie
 
Registered: Sep 2010
Location: Indonesia
Distribution: RedHat
Posts: 16

Rep: Reputation: 3
would you mind to post the log when you get failed to run mysql?

run as super user or sudoers
Code:
tail [mysql log directory]
 
Old 09-27-2010, 06:54 AM   #6
simonchapman_q
LQ Newbie
 
Registered: Sep 2010
Location: gravesend
Distribution: redhat, centos, fedora
Posts: 5

Original Poster
Rep: Reputation: 0
its not failing to start its failing to 're-start' but i don't want to kill the processes just incase it never restarts and then we have a big problem!! this is a server that is 'HIGHLY' used so I don't want to run the risk of killing it in the 'hope' it starts again, hence why i'm being rather nervous and asking on here.

I'll give you the bash output as you will see its being cautious about the ping, but one thing I also thought of is by stopping and starting the mysql_multi script as its on replication. But this failed to change the increment from 10 to 1..

the bash out from restarting the mysqld service
------------------------------------------------

[root@mailer0 ~]# bash -x /etc/init.d/mysqld restart
+ . /etc/rc.d/init.d/functions
++ TEXTDOMAIN=initscripts
++ umask 022
++ PATH=/sbin:/usr/sbin:/bin:/usr/bin
++ export PATH
++ '[' -z '' ']'
++ COLUMNS=80
++ '[' -z '' ']'
+++ /sbin/consoletype
++ CONSOLETYPE=pty
++ '[' -f /etc/sysconfig/i18n -a -z '' ']'
++ . /etc/profile.d/lang.sh
+++ sourced=0
+++ for langfile in /etc/sysconfig/i18n '$HOME/.i18n'
+++ '[' -f /etc/sysconfig/i18n ']'
+++ . /etc/sysconfig/i18n
++++ LANG=en_GB.UTF-8
++++ SYSFONT=latarcyrheb-sun16
+++ sourced=1
+++ for langfile in /etc/sysconfig/i18n '$HOME/.i18n'
+++ '[' -f /root/.i18n ']'
+++ '[' -n '' ']'
+++ '[' 1 = 1 ']'
+++ '[' -n en_GB.UTF-8 ']'
+++ export LANG
+++ '[' -n '' ']'
+++ unset LC_ADDRESS
+++ '[' -n '' ']'
+++ unset LC_CTYPE
+++ '[' -n '' ']'
+++ unset LC_COLLATE
+++ '[' -n '' ']'
+++ unset LC_IDENTIFICATION
+++ '[' -n '' ']'
+++ unset LC_MEASUREMENT
+++ '[' -n '' ']'
+++ unset LC_MESSAGES
+++ '[' -n '' ']'
+++ unset LC_MONETARY
+++ '[' -n '' ']'
+++ unset LC_NAME
+++ '[' -n '' ']'
+++ unset LC_NUMERIC
+++ '[' -n '' ']'
+++ unset LC_PAPER
+++ '[' -n '' ']'
+++ unset LC_TELEPHONE
+++ '[' -n '' ']'
+++ unset LC_TIME
+++ '[' -n '' ']'
+++ unset LC_ALL
+++ '[' -n '' ']'
+++ unset LANGUAGE
+++ '[' -n '' ']'
+++ unset LINGUAS
+++ '[' -n '' ']'
+++ unset _XKB_CHARSET
+++ consoletype=pty
+++ '[' -z pty ']'
+++ '[' -n '' ']'
+++ '[' -n '' ']'
+++ '[' -n en_GB.UTF-8 ']'
+++ case $LANG in
+++ '[' xterm = linux ']'
+++ unset SYSFONTACM SYSFONT
+++ unset sourced
+++ unset langfile
++ '[' -z '' ']'
++ '[' -f /etc/sysconfig/init ']'
++ . /etc/sysconfig/init
+++ BOOTUP=color
+++ GRAPHICAL=yes
+++ RES_COL=60
+++ MOVE_TO_COL='echo -en \033[60G'
+++ SETCOLOR_SUCCESS='echo -en \033[0;32m'
+++ SETCOLOR_FAILURE='echo -en \033[0;31m'
+++ SETCOLOR_WARNING='echo -en \033[0;33m'
+++ SETCOLOR_NORMAL='echo -en \033[0;39m'
+++ LOGLEVEL=3
+++ PROMPT=yes
+++ AUTOSWAP=no
++ '[' pty = serial ']'
++ '[' color '!=' verbose ']'
++ INITLOG_ARGS=-q
++ __sed_discard_ignored_files='/\(~\|\.bak\|\.orig\|\.rpmnew\|\.rpmorig\|\.rpms ave\)$/d'
+ . /etc/sysconfig/network
++ NETWORKING=yes
++ NETWORKING_IPV6=yes
++ HOSTNAME=mailer0.quintessentially.com
+ prog=MySQL
+ get_mysql_option mysqld datadir /var/lib/mysql
++ /usr/bin/my_print_defaults mysqld
++ sed -n 's/^--datadir=//p'
++ tail -n 1
+ result=
+ '[' -z '' ']'
+ result=/var/lib/mysql
+ datadir=/var/lib/mysql
+ get_mysql_option mysqld socket /var/lib/mysql/mysql.sock
++ /usr/bin/my_print_defaults mysqld
++ sed -n 's/^--socket=//p'
++ tail -n 1
+ result=/var/lib/mysql/mysql.sock
+ '[' -z /var/lib/mysql/mysql.sock ']'
+ socketfile=/var/lib/mysql/mysql.sock
+ get_mysql_option mysqld_safe log-error /var/log/mysqld.log
++ /usr/bin/my_print_defaults mysqld_safe
++ sed -n 's/^--log-error=//p'
++ tail -n 1
+ result=/var/log/mysqld.log
+ '[' -z /var/log/mysqld.log ']'
+ errlogfile=/var/log/mysqld.log
+ get_mysql_option mysqld_safe pid-file /var/run/mysqld/mysqld.pid
++ /usr/bin/my_print_defaults mysqld_safe
++ sed -n 's/^--pid-file=//p'
++ tail -n 1
+ result=/var/run/mysqld/mysqld.pid
+ '[' -z /var/run/mysqld/mysqld.pid ']'
+ mypidfile=/var/run/mysqld/mysqld.pid
+ case "$1" in
+ restart
+ stop
++ cat /var/run/mysqld/mysqld.pid
+ MYSQLPID=2568
+ '[' -n 2568 ']'
+ /bin/kill 2568
+ ret=0
+ '[' 0 -eq 0 ']'
+ STOPTIMEOUT=60
+ '[' 60 -gt 0 ']'
+ /bin/kill -0 2568
+ sleep 1
+ let STOPTIMEOUT=60-1
+ '[' 59 -gt 0 ']'
+ /bin/kill -0 2568
+ sleep 1
+ let STOPTIMEOUT=59-1
+ '[' 58 -gt 0 ']'
+ /bin/kill -0 2568
+ sleep 1
+ let STOPTIMEOUT=58-1
+ '[' 57 -gt 0 ']'
+ /bin/kill -0 2568
+ sleep 1
+ let STOPTIMEOUT=57-1
+ '[' 56 -gt 0 ']'
+ /bin/kill -0 2568
+ break
+ '[' 56 -eq 0 ']'
+ rm -f /var/lock/subsys/mysqld
+ rm -f /var/lib/mysql/mysql.sock
+ action 'Stopping MySQL: ' /bin/true
+ local STRING rc
+ STRING='Stopping MySQL: '
+ echo -n 'Stopping MySQL: '
Stopping MySQL: + '[' '' '!=' '' -a -w /etc/rhgb/temp/rhgb-console ']'
+ shift
+ /bin/true
+ success 'Stopping MySQL: '
+ '[' color '!=' verbose -a -z '' ']'
+ echo_success
+ '[' color = color ']'
+ echo -en '\033[60G'
+ echo -n '['
[+ '[' color = color ']'
+ echo -en '\033[0;32m'
+ echo -n ' OK '
OK + '[' color = color ']'
+ echo -en '\033[0;39m'
+ echo -n ']'
]+ echo -ne '\r'
+ return 0
+ return 0
+ rc=0
+ echo

+ '[' '' '!=' '' -a -w /etc/rhgb/temp/rhgb-console ']'
+ return 0
+ return 0
+ start
+ touch /var/log/mysqld.log
+ chown mysql:mysql /var/log/mysqld.log
+ chmod 0640 /var/log/mysqld.log
+ '[' -x /sbin/restorecon ']'
+ /sbin/restorecon /var/log/mysqld.log
+ '[' '!' -d /var/lib/mysql/mysql ']'
+ chown mysql:mysql /var/lib/mysql
+ chmod 0755 /var/lib/mysql
+ /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.so ck --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --user= mysql
+ ret=0
+ '[' 0 -eq 0 ']'
+ STARTTIMEOUT=30
+ '[' 30 -gt 0 ']'
++ /usr/bin/mysqladmin --socket=/var/lib/mysql/mysql.sock --user=UNKNOWN_MYSQL_U SER ping
+ RESPONSE='/usr/bin/mysqladmin: connect to server at '\''localhost'\'' failed
error: '\''Can'\''t connect to local MySQL server through socket '\''/var/lib/my sql/mysql.sock'\'' (2)'\''
Check that mysqld is running and that the socket: '\''/var/lib/mysql/mysql.sock' \'' exists!'
+ echo '/usr/bin/mysqladmin: connect to server at '\''localhost'\'' failed
error: '\''Can'\''t connect to local MySQL server through socket '\''/var/lib/my sql/mysql.sock'\'' (2)'\''
Check that mysqld is running and that the socket: '\''/var/lib/mysql/mysql.sock' \'' exists!'
+ grep -q 'Access denied for user'
+ sleep 1
+ let STARTTIMEOUT=30-1
+ '[' 29 -gt 0 ']'
++ /usr/bin/mysqladmin --socket=/var/lib/mysql/mysql.sock --user=UNKNOWN_MYSQL_U SER ping
+ RESPONSE='/usr/bin/mysqladmin: connect to server at '\''localhost'\'' failed
error: '\''Access denied for user '\''UNKNOWN_MYSQL_US'\''@'\''localhost'\'' (us ing password: NO)'\'''
+ break
+ '[' 29 -eq 0 ']'
+ action 'Starting MySQL: ' /bin/true
+ local STRING rc
+ STRING='Starting MySQL: '
+ echo -n 'Starting MySQL: '
Starting MySQL: + '[' '' '!=' '' -a -w /etc/rhgb/temp/rhgb-console ']'
+ shift
+ /bin/true
+ success 'Starting MySQL: '
+ '[' color '!=' verbose -a -z '' ']'
+ echo_success
+ '[' color = color ']'
+ echo -en '\033[60G'
+ echo -n '['
[+ '[' color = color ']'
+ echo -en '\033[0;32m'
+ echo -n ' OK '
OK + '[' color = color ']'
+ echo -en '\033[0;39m'
+ echo -n ']'
]+ echo -ne '\r'
+ return 0
+ return 0
+ rc=0
+ echo

+ '[' '' '!=' '' -a -w /etc/rhgb/temp/rhgb-console ']'
+ return 0
+ '[' 0 -eq 0 ']'
+ touch /var/lock/subsys/mysqld
+ return 0
+ exit 0

--------------------------------------------------------

thanks
 
Old 09-27-2010, 10:02 PM   #7
mardi
LQ Newbie
 
Registered: Sep 2010
Location: Indonesia
Distribution: RedHat
Posts: 16

Rep: Reputation: 3
Hi simonchapman_q,

Well, I though if you want to change auto_increment_increment variable, doesn't need to restart the MySQL daemon, right?
I don't know if you had another script to accomplish another task where it neet to restart the service.

I think you can try this one to display or change auto_increment_increment variable.

access this code on command mode on MySQL prompt

Quote:
mysql> SHOW VARIABLES LIKE 'auto_inc%';
what's the output?

this code to set the auto_increment_increment variable to 10
Quote:
mysql> SET @@auto_increment_increment=10;

Hope this can give you a little bit view about your problem.

Regards,
Mardi V. Tamma
 
Old 09-28-2010, 03:35 AM   #8
simonchapman_q
LQ Newbie
 
Registered: Sep 2010
Location: gravesend
Distribution: redhat, centos, fedora
Posts: 5

Original Poster
Rep: Reputation: 0
oh how I wish it was that simple! let me first point out im not a newbie with Linux and sql etc I'm a 'senior' systems admin, so all obvious answers (I think at least) have been done, such as using the mysql cli to set, but alas as soon as I exit from the mysql cli it goes straight back to the previous setting which is quite annoying as I wish so dearly that it could be the solution.

Like I previously said, the obvious way to do it would be to kill the mysql process and then 'start' but with a db server that runs 35 internal company sites, plus a further dozen external client sites, the last thing I want to do is run the risk of it not starting back up straight away. The thought of it does not even bare thinking about, another solution I thought of was to make a copy of our db server and set-up a new and temporarily re-point the dns so none of the other servers notice the difference (much) and then sorting out this server, the only problem with that is our mysql server is about 12GB in size, we have tables with excess of 43 million records, so this is no child's play. So realistically that is not easily achievable as by the time it has backed up and moved across there is going to be a great deal of loss of records in a number of tables, the problem is we are a worldwide company, we are open 24/7/365.. and most of these sites are in operation throughout that time. Hopefully you can now see why I am so nervous, I want to put something better in place where we have a duplicated server (not normal mysql replication) with a host that can ping to both (more technical than I want to go into on here).. but that would at least allow me (in this situation) shut one server down and leave the other running (we have a similar system for our mailer), but until I have that in place I need to sort this.. as something is wrong, and my nerves and going awol over the thought of that server crashing and mysql not restarting
 
  


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
Problem changing mysql uid,gid: mysql start fails gjatute Linux - Newbie 7 02-25-2010 01:38 AM
Bugzilla - MySQL - perl - DBD::mysql install problem amchargue Linux - Software 3 09-10-2008 12:01 AM
Problem Starting MySQL on Fresh Fedora 8 Install w/ Yum'd MySQL blong4life Linux - Server 2 07-04-2008 07:44 PM
Bugzilla - MySQL - perl - DBD::mysql install problem Runningonair Linux - Software 8 10-12-2007 12:42 AM
php-mysql dependancy problem after nitemare mysql upgrade. RHEL4 andrewc Red Hat 1 01-03-2006 04:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:41 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