Solved

service mysqld restart FAILS

Posted on 2011-03-22
12
738 Views
Last Modified: 2012-06-27
On my linux Red hat when i type
service mysqld restart, it fails. I tried changing many settings. Then finally i tried removing the sentence
[mysqld]
default_storage_engine=InnoDB
from /etc/my.cnf and it worked.  WOW.
But this seems to be the issue in my system alone.
My colleague's system does not have such problems. I can restart mysqld service on his system with the above sentence in /etc/my.cnf. Both are running the same version of mysql 5.0.77.
Any help?
0
Comment
Question by:pvinodp
12 Comments
 
LVL 48

Expert Comment

by:hernst42
ID: 35187085
Did you check the logs in /var/log if an error is mentioned there?
0
 

Author Comment

by:pvinodp
ID: 35187997
Hi,
I checked the mysqld.log. Following is the error i see when i cannot restart mysqld service:

110322 15:27:19  mysqld started
110322 15:27:19 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
110322 15:27:19 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
InnoDB: Error: auto-extending data file ./ibdata1 is of a different size
InnoDB: 0 pages (rounded down to MB) than specified in the .cnf file:
InnoDB: initial 640 pages, max 0 (relevant if non-zero) pages!
InnoDB: Could not open or create data files.
InnoDB: If you tried to add new data files, and it failed here,
InnoDB: you should now edit innodb_data_file_path in my.cnf back
InnoDB: to what it was, and remove the new ibdata files InnoDB created
InnoDB: in this failed attempt. InnoDB only wrote those files full of
InnoDB: zeros, but did not yet use them in any way. But be careful: do not
InnoDB: remove old data files which contain your precious data!
110322 15:27:19 Default storage engine (InnoDB) is not available
110322 15:27:19 Aborting

110322 15:27:19 [Note] /usr/libexec/mysqld: Shutdown complete

110322 15:27:19  mysqld ended
0
 
LVL 8

Expert Comment

by:pilson66
ID: 35188966
Please show your mysql config file
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:pvinodp
ID: 35189233
It is the same as my coleague's:

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
old_passwords=1


[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[mysqld]
default_storage_engine=InnoDB
0
 
LVL 8

Accepted Solution

by:
pilson66 earned 500 total points
ID: 35189310
you need to set up InnoDB options, for example:
 
innodb_data_home_dir = /var/lib/mysql/ibdata/
innodb_data_file_path=ibdata1:32M:autoextend
set-variable = innodb_buffer_pool_size=128M
set-variable = innodb_additional_mem_pool_size=16M
innodb_log_arch_dir = /var/lib/mysql/iblogs/
innodb_log_group_home_dir = /var/lib/mysql/iblogs/
innodb_log_archive=0
set-variable = innodb_log_files_in_group=1
set-variable = innodb_log_file_size=8M

Open in new window

0
 

Author Comment

by:pvinodp
ID: 35189503
But my colleagues system works without these..

how is it possible..this app has to be deployed in thousands of client systems... most of the my.cnf
which i have see do not have more information than mine.
Is there any other setting which has changed in my system?
0
 
LVL 8

Expert Comment

by:pilson66
ID: 35189534
copy working config from your colleague`s and try
0
 

Author Comment

by:pvinodp
ID: 35189972
tried.. dint work
0
 

Author Comment

by:pvinodp
ID: 35189974
i assume that you are talking about /etc/my.cnf file.
0
 
LVL 8

Assisted Solution

by:pilson66
pilson66 earned 500 total points
ID: 35190037
try to add options innodb_data_home_dir, innodb_data_file_path
0
 
LVL 6

Expert Comment

by:mohansahu
ID: 35197412
Hi,

if my.cnf is having problem, try to locate .cnf file in the system,

by default .cnf file is located in /usr/share/doc/MySQL-server-community-5.0.83/my-medium.cnf

rename my-medium.cnf to my.cnf in /etc/ folder...try to start the mysql service.
0
 

Author Closing Comment

by:pvinodp
ID: 35349814
Thanks all
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question