Solved

service mysqld restart FAILS

Posted on 2011-03-22
12
719 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
 

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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now