innodb_flush_log_at_trx_commit

2010-10-16 Thread short cutter
Hello,

Does innodb_flush_log_at_trx_commit = 1 or 2 make a busy mysql server
bad performance?
We found that setting it to 0 will make disk IO decrease a lot.

Thanks.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: innodb_flush_log_at_trx_commit

2010-10-16 Thread Sander de Bruijne
Setting this option is a trade-off between your durability requirement 
and performance requirement.


http://dev.mysql.com/doc/refman/5.1/en/innodb-parameters.html#sysvar_innodb_flush_log_at_trx_commit

0 gives best performance (write + flush once every second). 1 gives best 
durability (write + flush after each commit). 2 writes the log buffer to 
the log file at every commit, but flush it once every second.



On 10/16/2010 05:03 PM, short cutter wrote:

Hello,

Does innodb_flush_log_at_trx_commit = 1 or 2 make a busy mysql server
bad performance?
We found that setting it to 0 will make disk IO decrease a lot.

Thanks.

   


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



MySQL won't run on Ubuntu 10.10

2010-10-16 Thread Dave M G


MySQL List,

I'm running Ubuntu 10.10, and I have a LAMP server which is not connected to 
the internet, but is just used for locally creating and testing web sites.

MySQL does not seem to be running, however. Check out the output from these 
commands:

~$ sudo service mysql start
mysql start/running
~$ ps -ef | grep mysql
dave 23043 22341  0 23:57 pts/000:00:00 grep mysql

If I understand these outputs, it says MySQL is running when I start it up, 
but, after that, if I look for the process, it doesn't show up as
running.

When I run any of my local web sites that rely on MySQL, they don't work, so I 
guess the final verdict is that MySQL isn't on.

But, without any error when I try to start it, I'm not sure how to diagnose the 
problem.

I tried purging then re-installing MySQL, but that didn't change anything.

Any ideas on what else I could try?

Thank you for any advice.

-- Dave M G


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: MySQL won't run on Ubuntu 10.10

2010-10-16 Thread Sander de Bruijne

Check whether mysql is running:
ps aux | grep mysqld

If MySQL is not running, check /var/log/mysql/error.log for errors.

Have you changed /etc/mysql/my.cnf and/or /etc/mysql/conf.d/*.cnf or are 
are you still using the default config files from Ubuntu?



On 10/16/2010 06:30 PM, Dave M G wrote:


MySQL List,

I'm running Ubuntu 10.10, and I have a LAMP server which is not connected to 
the internet, but is just used for locally creating and testing web sites.

MySQL does not seem to be running, however. Check out the output from these 
commands:

~$ sudo service mysql start
mysql start/running
~$ ps -ef | grep mysql
dave 23043 22341  0 23:57 pts/000:00:00 grep mysql

If I understand these outputs, it says MySQL is running when I start it up, 
but, after that, if I look for the process, it doesn't show up as
running.

When I run any of my local web sites that rely on MySQL, they don't work, so I 
guess the final verdict is that MySQL isn't on.

But, without any error when I try to start it, I'm not sure how to diagnose the 
problem.

I tried purging then re-installing MySQL, but that didn't change anything.

Any ideas on what else I could try?

Thank you for any advice.

-- Dave M G


   


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: MySQL won't run on Ubuntu 10.10 [SOLVED]

2010-10-16 Thread Dave M G
 Bruijne,

Thank you for responding.

The my.cnf file was fine, but when you mentioned it, it sparked a long
forgotten memory that there was something specific to Ubuntu that
affects who has access to files like my.cnf.

After a little web searching, I realized it is a security thing called
Apparmour.

Long story short, when I upgraded Ubuntu, I kept the my.cnf file that
had served me well for years, but had overwritten
/etc/apparmor.d/usr.sbin.mysqld with new default settings. Some of the
directories in that file did not match my system.

Editing the Apparmour file and restarting both Apparmour and MySQL
solved the problem.

Thank you for setting me in the right direction.

-- 
Dave M G

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



about auto_increment id

2010-10-16 Thread short cutter
Hello,

I have a table which has the ID key with auto_increment and which is a
primary key.

If I insert the table with the id value which is generated by the
program, for example,

insert table (id, user_name, age) values (1000, 'kenn', 30);


the value 1000 is inserted forcely, not generated by database automatically.

Will this cause problem?

Thanks.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: about auto_increment id

2010-10-16 Thread mos

At 08:05 PM 10/16/2010, you wrote:

Hello,

I have a table which has the ID key with auto_increment and which is a
primary key.

If I insert the table with the id value which is generated by the
program, for example,

insert table (id, user_name, age) values (1000, 'kenn', 30);


the value 1000 is inserted forcely, not generated by database automatically.

Will this cause problem?

Thanks.


It is not going to cause a problem but it defeats the purpose of having an 
auto-inc column. After executing the SQL statement, the next Id inserted 
will be 1000. It is much better to let the table determine the next 
auto-inc value by using:



insert table (id, user_name, age) values (NULL, 'kenn', 30);


If you want to get the value of the Id that was used, simply reference the 
variable Last_Insert_Id as in:


select Last_Insert_Id;

See:
http://dev.mysql.com/doc/refman/5.0/en/getting-unique-id.html

Mike




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=mo...@fastmail.fm



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: about auto_increment id

2010-10-16 Thread mos

At 08:55 PM 10/16/2010, you wrote:

After executing the SQL statement, the next Id inserted will be 1000.


Oops. I meant :

After executing the SQL statement, the next Id inserted will be 1001.

Mike 



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: about auto_increment id

2010-10-16 Thread short cutter
Hi,

Is it possible to change this directive's value without modifition to
my.cnf and restart mysqld?
I remember there is a set @@variable syntax, but not sure.

Thanks.

2010/10/17 mos mo...@fastmail.fm:
 At 08:55 PM 10/16/2010, you wrote:

 After executing the SQL statement, the next Id inserted will be 1000.

 Oops. I meant :

 After executing the SQL statement, the next Id inserted will be 1001.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org