 |
 |
 |
 |
| Linux Chat The place to talk about anything linux-related outside of Fedora |

28th April 2009, 09:13 AM
|
|
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 mysql d start", for 5.1 I can do it with "service mysql start". Can anybody explain why?
Regards,
Max
|

28th April 2009, 09:24 AM
|
 |
Registered User
|
|
Join Date: Jan 2008
Location: New Delhi, India
Posts: 2,068

|
|
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!
|

28th April 2009, 09:28 AM
|
 |
Registered User
|
|
Join Date: Jan 2008
Location: New Delhi, India
Posts: 2,068

|
|
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;
|

28th April 2009, 09:49 AM
|
|
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
|

28th April 2009, 09:52 AM
|
 |
Registered User
|
|
Join Date: Jan 2008
Location: New Delhi, India
Posts: 2,068

|
|
|
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?
|

28th April 2009, 09:57 AM
|
|
Registered User
|
|
Join Date: Jan 2008
Posts: 32

|
|
Yes it has.
BTW, thank you for you quick and informative answers
Regards,
Max
|

28th April 2009, 09:59 AM
|
|
Registered User
|
|
Join Date: Jan 2008
Posts: 32

|
|
If I comment
Quote:
|
default-storage-engine=innodb
|
, mysql starts well.
|

28th April 2009, 10:04 AM
|
 |
Registered User
|
|
Join Date: Jan 2008
Location: New Delhi, India
Posts: 2,068

|
|
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.
|

28th April 2009, 10:10 AM
|
|
Guest
|
|
Posts: n/a

|
|
|
As I said, CentOS has its own forum. This forum is for FEDORA.
Wayne
|

9th September 2010, 04:24 PM
|
|
Registered User
|
|
Join Date: Aug 2010
Posts: 1

|
|
|
Re: MySQL 5.1 + InnoDB
Quote:
Originally Posted by sevmax
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.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 22:25 (Sunday, 19-05-2013)
|
|
 |
 |
 |
 |
|
|