Fedora Linux Support Community & Resources Center
  #1  
Old 28th April 2009, 09:13 AM
sevmax Offline
Registered User
 
Join Date: Jan 2008
Posts: 32
MySQL 5.1 + InnoDB

Hello, dear community.

I installed MySQL 5.1 64-bit from official RPMs at CentOS 5.2.
If uncomment "use innodb" in config file and run "show engines" inside mysql it show me that innodb available but isn't using. What should I do to run InnoDB at mysql 5.1?

one more question: for 5.0 I start mysql with command "service mysqld start", for 5.1 I can do it with "service mysql start". Can anybody explain why?

Regards,
Max
Reply With Quote
  #2  
Old 28th April 2009, 09:20 AM
Wayne
Guest
 
Posts: n/a
Not a Fedora question, moved to Linux Chat. CentOS has its own forum here:

http://www.centos.org/modules/newbb/

Wayne
Reply With Quote
  #3  
Old 28th April 2009, 09:24 AM
notageek Online
Registered User
 
Join Date: Jan 2008
Location: Bangalore, India
Posts: 2,145
Hi

Step 1:
Edit /etc/my.cnf and add the following:
Code:
default-storage-engine=innodb
Step 2:
Code:
# service mysqld restart
Step 3:
Voila!
Reply With Quote
  #4  
Old 28th April 2009, 09:28 AM
notageek Online
Registered User
 
Join Date: Jan 2008
Location: Bangalore, India
Posts: 2,145
Also there's an alternative to running InnoDB as default, engine can be defined during table creation

Code:
create table tablename(
columnname int primary key,
columname2 char(4)
)Engine=InnoDB;
Reply With Quote
  #5  
Old 28th April 2009, 09:49 AM
sevmax Offline
Registered User
 
Join Date: Jan 2008
Posts: 32
Thank you for your answers. Now i'm trying to run mysql, it gives me error after I changed my.cnf and tried to restart:

Quote:
#service mysql start
Starting MySQL.Manager of pid-file quit without updating fi[FAILED]
Can you comment this please.

regards,
Max
Reply With Quote
  #6  
Old 28th April 2009, 09:52 AM
notageek Online
Registered User
 
Join Date: Jan 2008
Location: Bangalore, India
Posts: 2,145
I missed the fact that you're running CentOS, therefore I wouldn't know if a service mysql exists.

After editing the /etc/my.cnf the server daemon needs to be restarted and it is mysqld, does CentOS have /etc/init.d/mysql?
Reply With Quote
  #7  
Old 28th April 2009, 09:57 AM
sevmax Offline
Registered User
 
Join Date: Jan 2008
Posts: 32
Yes it has.
BTW, thank you for you quick and informative answers

Regards,
Max
Reply With Quote
  #8  
Old 28th April 2009, 09:59 AM
sevmax Offline
Registered User
 
Join Date: Jan 2008
Posts: 32
If I comment
Quote:
default-storage-engine=innodb
, mysql starts well.
Reply With Quote
  #9  
Old 28th April 2009, 10:04 AM
notageek Online
Registered User
 
Join Date: Jan 2008
Location: Bangalore, India
Posts: 2,145
Hmm... I'm afraid nuances of CentOS are too great for me, my /etc/my.cnf on Fedora 9 looks like this:

Code:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
default-storage-engine=innodb

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
And then restart the mysqld (daemon), I'm not sure what service mysql (/etc/init.d/mysql) in CentOS does.
Reply With Quote
  #10  
Old 28th April 2009, 10:10 AM
Wayne
Guest
 
Posts: n/a
As I said, CentOS has its own forum. This forum is for FEDORA.

Wayne
Reply With Quote
  #11  
Old 9th September 2010, 04:24 PM
whitingjr Offline
Registered User
 
Join Date: Aug 2010
Posts: 1
linuxfedorafirefox
Re: MySQL 5.1 + InnoDB

Quote:
Originally Posted by sevmax View Post
Thank you for your answers. Now i'm trying to run mysql, it gives me error after I changed my.cnf and tried to restart:



Can you comment this please.

regards,
Max
Try changing the permissions of your directory.

If you have relocated the datadir from the default location then check the permissions of the files and directory. Including the parent directories (which caught me out).

I detected the problem by navigating to the datadir directory as a non-root user. Starting in the root directory then changing one directory at a time.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL Storage Engine InnoDB Disabled joeCoffee Servers & Networking 2 10th September 2008 04:08 PM
Postgresql VS MySQL (InnoDB) Lawes Using Fedora 2 17th January 2005 08:57 PM


Current GMT-time: 12:22 (Tuesday, 23-09-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat