Database lock on mysql import - Information

2012-09-10 Thread Roland RoLaNd
Dear all, I realize this is a very newbie question so bear with me please. I know that when you import/export a DB its tables are locked to ensure consistency and no data corruption. but why would other DBs on the same server get locked if im importing/exporting one DB ? in other words:

Temporary table creation fails

2012-09-10 Thread Machiel Richards - Gmail
Hi All I am hoping someone can point me in the right direction. We have a mysql 5.0 database which is giving us hassles when trying to create a temporary table. The creation works perfectly on the slave machine as well as all our other db's, however on the one specific main

Re: Temporary table creation fails

2012-09-10 Thread Ananda Kumar
try this command and see if you can get more info about the error show innodb status\G On Mon, Sep 10, 2012 at 2:25 PM, Machiel Richards - Gmail machiel.richa...@gmail.com wrote: Hi All I am hoping someone can point me in the right direction. We have a mysql 5.0 database which is

Re: Temporary table creation fails

2012-09-10 Thread Machiel Richards - Gmail
Hi We tried that as well, however the databases are quite busy and either other transactions overwrite the info, or there is nothing logged. We even tried running the create statement and immediately running Show innodb status, but nothing for that statement. Regards On

Re: Temporary table creation fails

2012-09-10 Thread Ananda Kumar
can you trying setting sort_buffer_size to big value at your session level and create the table On Mon, Sep 10, 2012 at 2:54 PM, Machiel Richards - Gmail machiel.richa...@gmail.com wrote: Hi We tried that as well, however the databases are quite busy and either other transactions

Re: Temporary table creation fails

2012-09-10 Thread Machiel Richards - Gmail
Hi, the sort_buffer_size was set to 8Mb as well as 32M for the session (currently 1M) and retried with same result. On 09/10/2012 11:55 AM, Ananda Kumar wrote: can you trying setting sort_buffer_size to big value at your session level and create the table On Mon, Sep 10, 2012 at 2:54 PM,

Re: Temporary table creation fails

2012-09-10 Thread Ananda Kumar
start with 500MB and try On Mon, Sep 10, 2012 at 3:31 PM, Machiel Richards - Gmail machiel.richa...@gmail.com wrote: Hi, the sort_buffer_size was set to 8Mb as well as 32M for the session (currently 1M) and retried with same result. On 09/10/2012 11:55 AM, Ananda Kumar wrote: can

Re: Temporary table creation fails

2012-09-10 Thread Machiel Richards - Gmail
Hi, still no luck, same error being given immediately after pressing enter. On 09/10/2012 12:02 PM, Ananda Kumar wrote: start with 500MB and try On Mon, Sep 10, 2012 at 3:31 PM, Machiel Richards - Gmail machiel.richa...@gmail.com mailto:machiel.richa...@gmail.com wrote: Hi, the

Re: Temporary table creation fails

2012-09-10 Thread Akshay Suryavanshi
Hi, If you dont have data on the server, would you please initialize the data directory. Use mysql-install-db and give proper data directory and proper cnf file if you are giving so. Also specify the user as root if you have root access. Thanks On Mon, Sep 10, 2012 at 3:34 PM, Machiel

Re: Temporary table creation fails

2012-09-10 Thread Machiel Richards - Gmail
This is a current production database with about 100Gb + of data and the DB is extremely busy. On 09/10/2012 12:08 PM, Akshay Suryavanshi wrote: Hi, If you dont have data on the server, would you please initialize the data directory. Use mysql-install-db and give proper data directory

Help with mysql connect_timeout

2012-09-10 Thread Kamalakar Reddy Y
But connect-timeout has nothing to do with termination of query. It is no. of secs that mysqld server waits for a connect packet before responding with Bad handshake, default value is 10 seconds. Probably you should adjust net_read /write_ timeout.

Re: Help with mysql connect_timeout

2012-09-10 Thread Kamalakar Reddy Y
But connect-timeout has nothing to do with termination of query. It is no. of secs that mysqld server waits for a connect packet before responding with Bad handshake, default value is 10 seconds. Probably you should adjust net_read /write_ timeout.

Re: Database lock on mysql import - Information

2012-09-10 Thread Johnny Withers
When you say locked, do queries on the other databases fail with an error? If so, whats the error? Is it all queries, or just inserts? Also, how are you doing your export and import? Sent from my iPad On Sep 10, 2012, at 2:38 AM, Roland RoLaNd r_o_l_a_...@hotmail.com wrote: Dear all, I

Re: Temporary table creation fails

2012-09-10 Thread Rik Wasmus
the message ERROR 1005 (HY000): Can't create table '/tmp/#sql4a27_68eed1_0.frm' (errno: -1) Basics first: 1) Is the /tmp directory write readable for the user mysql runs as? 2) Has the /tmp directory enough free space? -- Rik Wasmus -- MySQL General Mailing List For list archives:

re: ignore-db-dir

2012-09-10 Thread Michael Widenius
Hi! Noel == Noel Butler noel.but...@ausics.net writes: Noel Shaun, Noel Is this option planned for backport into 5.5.x ? Another option is to provide a patch and suggest to have it included in MariaDB 5.5. You can of course also consider to sponsor this so that we can do this for you...

Re: Temporary table creation fails

2012-09-10 Thread Machiel Richards - Gmail
Hi, We confirmed that the /tmp directory permissions is set to rwxrwxrwxt and is owned by root , the same as all our other servers. There is also about 60Gb of free space on the filesystem where /tmp resides. Regards On 09/10/2012 01:11 PM, Rik Wasmus wrote: the message ERROR

Re: Temporary table creation fails

2012-09-10 Thread Ananda Kumar
this temp table will hold how many rows, what would be its size. On Mon, Sep 10, 2012 at 5:03 PM, Machiel Richards - Gmail machiel.richa...@gmail.com wrote: Hi, We confirmed that the /tmp directory permissions is set to rwxrwxrwxt and is owned by root , the same as all our other servers.

Re: Temporary table creation fails

2012-09-10 Thread Machiel Richards - Gmail
Hi at the moment this does not really matter to us. we have even tried to create a temp table with only one field in order to insert one row for testing, but we are currently not able to create any temporary tables whatsoever as even the simplest form of table still gives the same

Re: Temporary table creation fails

2012-09-10 Thread Ananda Kumar
did u check if there any firewall settings, forbidding you to create files, check if SELinux is disabled On Mon, Sep 10, 2012 at 6:08 PM, Machiel Richards - Gmail machiel.richa...@gmail.com wrote: Hi at the moment this does not really matter to us. we have even tried to create a

Re: Temporary table creation fails

2012-09-10 Thread Akshay Suryavanshi
Hi, If you can afford try changing the tmpdir for mysql. This is a static variable and will require a mysql restart. thanks On Mon, Sep 10, 2012 at 6:08 PM, Machiel Richards - Gmail machiel.richa...@gmail.com wrote: Hi at the moment this does not really matter to us. we have even

Re: Temporary table creation fails

2012-09-10 Thread Machiel Richards - Gmail
no selinux , checked this as well. We generally dont use selinux and disable it completely from installation. I have also gone through the firewall settings and that is only rules for connections. On 09/10/2012 02:40 PM, Ananda Kumar wrote: did u check if there any firewall settings,

Re: Temporary table creation fails

2012-09-10 Thread Ananda Kumar
please share the command ur using to create the temp table On Mon, Sep 10, 2012 at 6:11 PM, Machiel Richards - Gmail machiel.richa...@gmail.com wrote: no selinux , checked this as well. We generally dont use selinux and disable it completely from installation. I have also gone through

Re: Temporary table creation fails

2012-09-10 Thread Garot Conklin
Apologies if I missed this in the thread but have you confirmed not only the effectve perms for the directory but that another user can write to this dirrectory? Perhaps outside of mysql for instance; I.e. other processes are successfully writting logs to /tmp? Anything to share from the mysql

Re: Temporary table creation fails

2012-09-10 Thread Machiel Richards - Gmail
Hi, permissions are confirmed as being correct. Other applications and users are currently writing files to this directory yes. The only thing found in the log is innodb error 13 stating that either a second mysqld is running or that there is a filesystem permissions issue.

Re: Temporary table creation fails

2012-09-10 Thread Manuel Arostegui
2012/9/10 Machiel Richards - Gmail machiel.richa...@gmail.com Hi, permissions are confirmed as being correct. Other applications and users are currently writing files to this directory yes. Have you tried su - mysql and touch /tmp/test? (if your mysql user has shell...) Good luck!

Re: Temporary table creation fails

2012-09-10 Thread Garot Conklin
Not to beat the perms to death but /tmp should have the sticky bit set as well... so 1777 not just 0777.  Perhaps hard kill any lingering mysql PIDS unless this is production and u expect other DB's to be running... if u have duplicated this DB schema somewhow by mistake and a second or first

Re: Temporary table creation fails

2012-09-10 Thread Shawn Green
On 9/10/2012 9:55 AM, Garot Conklin wrote: Not to beat the perms to death but /tmp should have the sticky bit set as well... so 1777 not just 0777. Perhaps hard kill any lingering mysql PIDS unless this is production and u expect other DB's to be running... if u have duplicated this DB

RE: Create a VIEW with nested SQL

2012-09-10 Thread Rick James
SELECT ... ORDER BY .. GROUP BY.. is syntactically incorrect. ( SELECT ... ORDER BY .. ) GROUP BY .. Is what I call the group by trick. It is an optimal way to SELECT all the fields corresponding to the MAX (or MIN) of one of the fields. But it depends on the optimizer not screwing it up.