mysql problem
Hi, i'v installed postfix-mysql + mysql-server + courier-imap and imap-ssl + courier-pop and pop-ssl on OpenBSD 4.8-Stable But now i have a problem with vmail and mysql, i'v created the database for postfix users Pastebin link of database: http://pastebin.com/70qd43AZ And i insert my account into database mail with: mysql INSERT INTO users (login, name, password, maildir) - VALUES ('gdrm@my_domain.org', 'Gianluca', ENCRYPT('my_password'), - '/my_site.org/gdrm/'); When i connect with mutt: mutt -f imaps://my_u...@example.com@localhost the password does not match! Or when i try: sudo -u vmail mutt -f /var/vmail/mydomain.org/user_name I don't know where is the problem, can u help me?? Tks vvm --- g...@email.it -- Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f Sponsor: Vuoi farti o vuoi fare un regalo originale? Visita MisterCupido.com e personalizza con foto: quadri, tazze, puzzle, cuscini, magliette, peluche, borse, portachiavi... Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=11025d=8-4
Re: mysql problem
On Fri, 8 Apr 2011 09:52:15 +0200 Gianluca D'Auri Muscelli g...@email.it wrote: Hi, i'v installed postfix-mysql + mysql-server + courier-imap and imap-ssl + courier-pop and pop-ssl on OpenBSD 4.8-Stable But now i have a problem with vmail and mysql, i'v created the database for postfix users Pastebin link of database: http://pastebin.com/70qd43AZ And i insert my account into database mail with: mysql INSERT INTO users (login, name, password, maildir) - VALUES ('gdrm@my_domain.org', 'Gianluca', ENCRYPT('my_password'), - '/my_site.org/gdrm/'); When i connect with mutt: mutt -f imaps://my_u...@example.com@localhost the password does not match! Or when i try: sudo -u vmail mutt -f /var/vmail/mydomain.org/user_name I don't know where is the problem, can u help me?? Tks vvm This is postfix related, not OpenBSD. You are on bad list. jirib
Re: Joomla - MySQL Problem: Could not connect to MySQL
Not quite a solution, I think. What about if /var/www mounts in a different filesystem than /var? Hardlinks from chrooted environments don't seem to be a wise solution anyway... Just IMHO. Regards, Dani El 12/03/2010 12:16, Sunnz escribiC3: 2010/3/11 Janmalepa...@googlemail.com: I didn't notice, that httpd was still running. kill -TERM ID_of_httpd httpd -u solved the problem. Thank you! Everything works fine! Now that it works we know that it was a problem with chroot. It might be a good practice now to hardlink the mysql.sock in the chroot directory so that you can run apache chrooted... I think you do something like: # mkdir -p /var/www/var/run/mysql # ln -f /var/run/mysql/mysql.sock /var/www/var/run/mysql/mysql.sock Then if you shut down httpd and start it again, you shouldn't need -u any more.
Re: Joomla - MySQL Problem: Could not connect to MySQL
On Fri, Mar 12, 2010 at 6:58 PM, Daniel Gracia Garallar danie...@electronicagracia.com wrote: Not quite a solution, I think. What about if /var/www mounts in a different filesystem than /var? how about - tell mysql to create sock file in /var/www/var/run/mysql; or - tell php to connect to mysql over tcp/ip -- O ascii ribbon campaign - stop html mail - www.asciiribbon.org
Re: Joomla - MySQL Problem: Could not connect to MySQL
2010/3/12 Daniel Gracia Garallar danie...@electronicagracia.com: Not quite a solution, I think. What about if /var/www mounts in a different filesystem than /var? Hardlinks from chrooted environments don't seem to be a wise solution anyway... Just IMHO. In that case you could change the location mysqld itself uses to be inside the chroot. Or do you actually have a solution?
Re: Joomla - MySQL Problem: Could not connect to MySQL
On Sat, 13 Mar 2010, Sunnz wrote: 2010/3/12 Daniel Gracia Garallar danie...@electronicagracia.com: Not quite a solution, I think. What about if /var/www mounts in a different filesystem than /var? Hardlinks from chrooted environments don't seem to be a wise solution anyway... Just IMHO. In that case you could change the location mysqld itself uses to be inside the chroot. Or do you actually have a solution? The solution is to use 127.0.0.1 for the connection, as stated previously. Lee
Re: Joomla - MySQL Problem: Could not connect to MySQL
This has also worked for me in the past. Bert On 3/13/10 9:27 AM, L. V. Lammert l...@omnitec.net wrote: On Sat, 13 Mar 2010, Sunnz wrote: 2010/3/12 Daniel Gracia Garallar danie...@electronicagracia.com: Not quite a solution, I think. What about if /var/www mounts in a different filesystem than /var? Hardlinks from chrooted environments don't seem to be a wise solution anyway... Just IMHO. In that case you could change the location mysqld itself uses to be inside the chroot. Or do you actually have a solution? The solution is to use 127.0.0.1 for the connection, as stated previously. Lee
Re: Joomla - MySQL Problem: Could not connect to MySQL
On 2010-03-13, Sunnz sun...@gmail.com wrote: 2010/3/12 Daniel Gracia Garallar danie...@electronicagracia.com: Not quite a solution, I think. What about if /var/www mounts in a different filesystem than /var? Hardlinks from chrooted environments don't seem to be a wise solution anyway... Just IMHO. In that case you could change the location mysqld itself uses to be inside the chroot. yes, this works well. borrowing from the notes in the drupal package; -- -- -- In order to run with standard OpenBSD chroot'ed httpd: - make sure you can connect to your database. Create a directory for the mysql socket. mkdir -p /var/www/var/run/mysql Adjust /etc/my.cnf to put the mysql socket into the chroot. [client] socket = /var/www/var/run/mysql/mysql.sock [mysqld] socket = /var/www/var/run/mysql/mysql.sock -- -- -- if you have an application outside the chroot where you can't set the socket path, you can create /var/run/mysql and create a symlink in that directory pointing at the socket inside /var/www/var/run/mysql..
Re: Joomla - MySQL Problem: Could not connect to MySQL
2010/3/11 Jan malepa...@googlemail.com: I didn't notice, that httpd was still running. kill -TERM ID_of_httpd httpd -u solved the problem. Thank you! Everything works fine! Now that it works we know that it was a problem with chroot. It might be a good practice now to hardlink the mysql.sock in the chroot directory so that you can run apache chrooted... I think you do something like: # mkdir -p /var/www/var/run/mysql # ln -f /var/run/mysql/mysql.sock /var/www/var/run/mysql/mysql.sock Then if you shut down httpd and start it again, you shouldn't need -u any more.
Re: Joomla - MySQL Problem: Could not connect to MySQL
Sounds very interesting. But using find / -name mysql.sock isn't successful, so creating a hardlink doesn't work. The directory /var/run/mysql doesn't exist either. Jan Sunnz wrote: 2010/3/11 Jan malepa...@googlemail.com: I didn't notice, that httpd was still running. kill -TERM ID_of_httpd httpd -u solved the problem. Thank you! Everything works fine! Now that it works we know that it was a problem with chroot. It might be a good practice now to hardlink the mysql.sock in the chroot directory so that you can run apache chrooted... I think you do something like: # mkdir -p /var/www/var/run/mysql # ln -f /var/run/mysql/mysql.sock /var/www/var/run/mysql/mysql.sock Then if you shut down httpd and start it again, you shouldn't need -u any more.
Re: Joomla - MySQL Problem: Could not connect to MySQL
Jan wrote: I didn't notice, that httpd was still running. kill -TERM ID_of_httpd httpd -u solved the problem. Thank you! Everything works fine! Well if you're happy running httpd non-chrooted, then fine (seriously). I would not be though. If not, there is more stuff to try in my last reply. Oh, and since misc@ is pretty noisy, I would suggest using reply to all, as at least I don't keep track of every thread I've posted to. I just found this reply by accident. :-) Jan Alexander Hall wrote: Jan wrote: Thank you for the numerous responses! Except the solution to change localhost to 127.0.0.1 in the whole script, I tried everything you Do try that then. I dont know the script at hand, but it cannot be that many places that creates a database connection, can it? IIRC, localhost implies file socket, and even if I'm wrong, it requires a name lookup, and you might be missing /etc stuff in the chroot. proposed. It still doesn't work. Here a short review: === Are you trying to connect to the MySQL socket outside of the httpd chroot? === after having run apachectl start, I tried the same process using httpd -u. But nothing changed. You did mean you killed httpd in between, yes? === mysql -h localhost -u root -p Works perfect. mysql -h localhost -u joomla -p works also. How about mysql -h 127.0.0.1 -P 3306 -u joomla -p ? /Alexander === Have a look in /var/www/logs/ ===in the errorlog of the folder is no entry. access_log shows up: 172.16.172.130 -- [09/Mar/2010:09:47:26 -0700] POST /user01/installation/index.php HTTP/1.1 200 4270 === At the very least you'll also need the php5-mysql-5.2.6.tgz package installed as well. === php5-mysql and php5-mysqli packets are installed both === At the very least you'll also need the php5-mysql-5.2.6.tgz package installed as well. == That's the output of the mysql part in the phpinfo();: mysql MySQL Supportenabled active persistent links0 active links0 client api version5.0.51a mysql_module_typeexternal mysql_socket/var/run/mysql/mysql.sock mysql_include-I/usr/local/include/mysql mysql_libs-L/usr/local/include/mysql directivelocal valuemaster value mysql.allow_persistentOnOn mysql.connect_timeout6060 mysql.default_hostno valueno value mysql.default_passwordno valueno value mysql.default_portno valueno value mysql.default_socketno valueno value mysql.default_userno valueno value mysql.max_linksUnlimitedUnlimited mysql.max_persistentUnlimitedUnlimited mysql.trace_modeOffOff Thank you! Jan
Re: Joomla - MySQL Problem: Could not connect to MySQL
I didn't notice, that httpd was still running. kill -TERM ID_of_httpd httpd -u solved the problem. Thank you! Everything works fine! Jan Alexander Hall wrote: Jan wrote: Thank you for the numerous responses! Except the solution to change localhost to 127.0.0.1 in the whole script, I tried everything you Do try that then. I dont know the script at hand, but it cannot be that many places that creates a database connection, can it? IIRC, localhost implies file socket, and even if I'm wrong, it requires a name lookup, and you might be missing /etc stuff in the chroot. proposed. It still doesn't work. Here a short review: === Are you trying to connect to the MySQL socket outside of the httpd chroot? === after having run apachectl start, I tried the same process using httpd -u. But nothing changed. You did mean you killed httpd in between, yes? === mysql -h localhost -u root -p Works perfect. mysql -h localhost -u joomla -p works also. How about mysql -h 127.0.0.1 -P 3306 -u joomla -p ? /Alexander === Have a look in /var/www/logs/ ===in the errorlog of the folder is no entry. access_log shows up: 172.16.172.130 -- [09/Mar/2010:09:47:26 -0700] POST /user01/installation/index.php HTTP/1.1 200 4270 === At the very least you'll also need the php5-mysql-5.2.6.tgz package installed as well. === php5-mysql and php5-mysqli packets are installed both === At the very least you'll also need the php5-mysql-5.2.6.tgz package installed as well. == That's the output of the mysql part in the phpinfo();: mysql MySQL Supportenabled active persistent links0 active links0 client api version5.0.51a mysql_module_typeexternal mysql_socket/var/run/mysql/mysql.sock mysql_include-I/usr/local/include/mysql mysql_libs-L/usr/local/include/mysql directivelocal valuemaster value mysql.allow_persistentOnOn mysql.connect_timeout6060 mysql.default_hostno valueno value mysql.default_passwordno valueno value mysql.default_portno valueno value mysql.default_socketno valueno value mysql.default_userno valueno value mysql.max_linksUnlimitedUnlimited mysql.max_persistentUnlimitedUnlimited mysql.trace_modeOffOff Thank you! Jan
Re: Joomla - MySQL Problem: Could not connect to MySQL
Jan wrote: Thank you for the numerous responses! Except the solution to change localhost to 127.0.0.1 in the whole script, I tried everything you Do try that then. I dont know the script at hand, but it cannot be that many places that creates a database connection, can it? IIRC, localhost implies file socket, and even if I'm wrong, it requires a name lookup, and you might be missing /etc stuff in the chroot. proposed. It still doesn't work. Here a short review: === Are you trying to connect to the MySQL socket outside of the httpd chroot? === after having run apachectl start, I tried the same process using httpd -u. But nothing changed. You did mean you killed httpd in between, yes? === mysql -h localhost -u root -p Works perfect. mysql -h localhost -u joomla -p works also. How about mysql -h 127.0.0.1 -P 3306 -u joomla -p ? /Alexander === Have a look in /var/www/logs/ ===in the errorlog of the folder is no entry. access_log shows up: 172.16.172.130 -- [09/Mar/2010:09:47:26 -0700] POST /user01/installation/index.php HTTP/1.1 200 4270 === At the very least you'll also need the php5-mysql-5.2.6.tgz package installed as well. === php5-mysql and php5-mysqli packets are installed both === At the very least you'll also need the php5-mysql-5.2.6.tgz package installed as well. == That's the output of the mysql part in the phpinfo();: mysql MySQL Supportenabled active persistent links0 active links0 client api version5.0.51a mysql_module_typeexternal mysql_socket/var/run/mysql/mysql.sock mysql_include-I/usr/local/include/mysql mysql_libs-L/usr/local/include/mysql directivelocal valuemaster value mysql.allow_persistentOnOn mysql.connect_timeout6060 mysql.default_hostno valueno value mysql.default_passwordno valueno value mysql.default_portno valueno value mysql.default_socketno valueno value mysql.default_userno valueno value mysql.max_linksUnlimitedUnlimited mysql.max_persistentUnlimitedUnlimited mysql.trace_modeOffOff Thank you! Jan
Re: Joomla - MySQL Problem: Could not connect to MySQL
Thank you for the numerous responses! Except the solution to change localhost to 127.0.0.1 in the whole script, I tried everything you proposed. It still doesn't work. Here a short review: === Are you trying to connect to the MySQL socket outside of the httpd chroot? === after having run apachectl start, I tried the same process using httpd -u. But nothing changed. === mysql -h localhost -u root -p Works perfect. mysql -h localhost -u joomla -p works also. === Have a look in /var/www/logs/ ===in the errorlog of the folder is no entry. access_log shows up: 172.16.172.130 -- [09/Mar/2010:09:47:26 -0700] POST /user01/installation/index.php HTTP/1.1 200 4270 === At the very least you'll also need the php5-mysql-5.2.6.tgz package installed as well. === php5-mysql and php5-mysqli packets are installed both === At the very least you'll also need the php5-mysql-5.2.6.tgz package installed as well. == That's the output of the mysql part in the phpinfo();: mysql MySQL Supportenabled active persistent links0 active links0 client api version5.0.51a mysql_module_typeexternal mysql_socket/var/run/mysql/mysql.sock mysql_include-I/usr/local/include/mysql mysql_libs-L/usr/local/include/mysql directivelocal valuemaster value mysql.allow_persistentOnOn mysql.connect_timeout6060 mysql.default_hostno valueno value mysql.default_passwordno valueno value mysql.default_portno valueno value mysql.default_socketno valueno value mysql.default_userno valueno value mysql.max_linksUnlimitedUnlimited mysql.max_persistentUnlimitedUnlimited mysql.trace_modeOffOff Thank you! Jan
Joomla - MySQL Problem: Could not connect to MySQL
Hello all together, I installed PHP and MySQL on my box (running apache). When I try to install Joomla, the MySQL Database is recognized by the precheck of the install script. But when I try to connect to the database I get the following error msg: Unable to connect to the database: Could not connect to MySQL I'm a newbie using BSD. I tried really hard, but a simple mistake could be possible. I added the following 3 packets, installed MySQL and set the symbolic links: mysql-server-5.0.51ap1.tgz php5-core-5.2.6.tgz php5-mysqli-5.2.6.tgz I start mysql using the command: /usr/local/bin/mysqld_safe I'm also able open the DB using mysql -u root -p. Any ideas? Jan
Re: Joomla - MySQL Problem: Could not connect to MySQL
Jan wrote: I added the following 3 packets, installed MySQL and set the symbolic links: mysql-server-5.0.51ap1.tgz php5-core-5.2.6.tgz php5-mysqli-5.2.6.tgz Any ideas? Jan At the very least you'll also need the php5-mysql-5.2.6.tgz package installed as well. It contains the base mysql stuff, mysqli is additional to the base. Try that and see how it goes. -- -RSM http://www.erratic.ca
Re: Joomla - MySQL Problem: Could not connect to MySQL
On Mon, Mar 8, 2010 at 10:07 PM, Jan malepa...@googlemail.com wrote: Any ideas? Are you trying to connect to the MySQL socket outside of the httpd chroot? Floor -- Floor Terra flo...@gmail.com www: http://brobding.mine.nu/
Re: Joomla - MySQL Problem: Could not connect to MySQL
On 8 Mar 2010, at 21:07, Jan wrote: Unable to connect to the database: Could not connect to MySQL Check that your code is connecting to 127.0.0.1 instead of localhost? Usually fixes it for me and you don't need to worry messing around with sockets. G. -- Bought to you by the Department of Redundancy Department's Recursion Division of Recursion http://playr.co.uk/
Re: Joomla - MySQL Problem: Could not connect to MySQL
On Mon, 8 Mar 2010, Jan wrote: Unable to connect to the database: Could not connect to MySQL 1) Create a simple phpinfo() page check to see that your MySQL is configured properly. Did you install php-mysql? 2) I'm also able open the DB using mysql -u root -p. The only valid test is with the UID PW that you created for Joomla - you did create it, didn't you? Lee
Re: Joomla - MySQL Problem: Could not connect to MySQL
On Mon, Mar 8, 2010 at 9:07 PM, Jan malepa...@googlemail.com wrote: Hello all together, I installed PHP and MySQL on my box (running apache). When I try to install Joomla, the MySQL Database is recognized by the precheck of the install script. But when I try to connect to the database I get the following error msg: Unable to connect to the database: Could not connect to MySQL I'm a newbie using BSD. I tried really hard, but a simple mistake could be possible. I added the following 3 packets, installed MySQL and set the symbolic links: mysql-server-5.0.51ap1.tgz php5-core-5.2.6.tgz php5-mysqli-5.2.6.tgz I start mysql using the command: /usr/local/bin/mysqld_safe I'm also able open the DB using mysql -u root -p. What happens when you try: mysql -h localhost -u root -p But as the error messages says - Joomla cannot connect to your database (mysql). Have a look in /var/www/logs/ especially the error logs and also in the error logs for mysql - they should help resolve this issue. hth Fred
Cyrus-SASL2-mysql problem on 4.2
Hello misc, I installed cyrus-sasl-2.1.22p1-mysql from packages and trying make it working, but during testsaslauthd queries I not get any results :(. I enabled log queries in mysql but there is no connection attempts from saslauthd to needed table (no connection, no auth, nothing). As described in documentation I created smtpd.conf and pit it to needed dir. # cat /usr/local/lib/sasl2/smtpd.conf pwcheck_method: auxprop auxprop_plugin: sql sql_engine: mysql mech_list: PLAIN LOGIN sql_user: postfix sql_passwd: postfix sql_hostnames: localhost sql_database: postfix sql_statement: SELECT password FROM mailbox WHERE username = '%u' sql_verbose: yes # saslauthd -d -a getpwent saslauthd[19646] :main: num_procs : 5 saslauthd[19646] :main: mech_option: NULL saslauthd[19646] :main: run_path : /var/sasl2 saslauthd[19646] :main: auth_mech : getpwent saslauthd[19646] :ipc_init: using accept lock file: /var/sasl2/mux.accept saslauthd[19646] :detach_tty : master pid is: 0 saslauthd[19646] :ipc_init: listening on socket: /var/sasl2/mux saslauthd[19646] :main: using process model saslauthd[19646] :have_baby : forked child: 8299 saslauthd[8299] :get_accept_lock : acquired accept lock saslauthd[19646] :have_baby : forked child: 14091 saslauthd[19646] :have_baby : forked child: 21287 saslauthd[19646] :have_baby : forked child: 12263 # testsaslauthd -s smtpd -u eject -p mypassword 0: NO authentication failed # testsaslauthd -u eject -p mypassword 0: NO authentication failed === In saslauthd debug output after query 1. saslauthd[14091] :get_accept_lock : acquired accept lock saslauthd[8299] :rel_accept_lock : released accept lock saslauthd[8299] :do_auth : auth failure: [user=eject] [service=smtpd] [realm=] [mech=getpwent] [reason=Unknown] saslauthd[8299] :do_request : response: NO saslauthd[8299] :do_auth : auth failure: [user=eject][service=imapd] [realm=] [mech=getpwent] [reason=Unknown] saslauthd[8299] :do_request : response: NO # tail -f /var/mysql/query.log nothing related to my queries After this I run saslauthd with ktrace to see what files it read when it runs. During running ktrace I run some queries. # ktrace saslauthd -d -a getpwent saslauthd[7962] :main: num_procs : 5 saslauthd[7962] :main: mech_option: NULL saslauthd[7962] :main: run_path : /var/sasl2 saslauthd[7962] :main: auth_mech : getpwent saslauthd[7962] :ipc_init: using accept lock file: /var/sasl2/mux.accept saslauthd[7962] :detach_tty : master pid is: 0 saslauthd[7962] :ipc_init: listening on socket: /var/sasl2/mux saslauthd[7962] :main: using process model saslauthd[7962] :have_baby : forked child: 23867 saslauthd[23867] :get_accept_lock : acquired accept lock saslauthd[7962] :have_baby : forked child: 16377 saslauthd[7962] :have_baby : forked child: 24519 saslauthd[7962] :have_baby : forked child: 28716 I discovered (see below) that saslauthd not looking for smtpd.conf during it :( why? # kdump | grep NAMI 7962 ktrace NAMI /sbin/saslauthd 7962 ktrace NAMI /usr/sbin/saslauthd 7962 ktrace NAMI /bin/saslauthd 7962 ktrace NAMI /usr/bin/saslauthd 7962 ktrace NAMI /usr/X11R6/bin/saslauthd 7962 ktrace NAMI /usr/local/sbin/saslauthd 7962 saslauthd NAMI /usr/libexec/ld.so 7962 saslauthd NAMI /var/run/ld.so.hints 7962 saslauthd NAMI /usr/lib/libcrypto.so.13.0 7962 saslauthd NAMI /usr/lib/libc.so.41.0 7962 saslauthd NAMI /usr/lib/libcom_err.so.16.0 7962 saslauthd NAMI /usr/lib/libkrb5.so.16.0 7962 saslauthd NAMI /usr/lib/libasn1.so.16.0 7962 saslauthd NAMI /usr/lib/libgssapi.so.5.0 7962 saslauthd NAMI /etc/malloc.conf 7962 saslauthd NAMI /dev/log 7962 saslauthd NAMI /etc/localtime 7962 saslauthd NAMI /etc/localtime 7962 saslauthd NAMI /var/sasl2 7962 saslauthd NAMI /var/sasl2/saslauthd.pid.lock 7962 saslauthd NAMI /var/sasl2/mux.accept 7962 saslauthd NAMI /var/sasl2/mux 7962 saslauthd NAMI /var/sasl2/mux 7962 saslauthd NAMI /var/sasl2/mux 7962 saslauthd NAMI /var/sasl2/saslauthd.pid.lock 7962 saslauthd NAMI /var/sasl2/mux.accept 7962 saslauthd NAMI /var/sasl2/mux I will be sincerely thankful if anybody advice what's wrong in my case. -- Best regards, Evgeniy mailto:[EMAIL PROTECTED]
Re: Cyrus-SASL2-mysql problem on 4.2
On Wed, 14 Nov 2007, Evgeniy Sudyr wrote: # cat /usr/local/lib/sasl2/smtpd.conf pwcheck_method: auxprop [...] # testsaslauthd -s smtpd -u eject -p mypassword 0: NO authentication failed If you use auxprop as pwcheck_method, then why are you testing with testsaslauthd? Also, did you install the sasl2 of postfix? -- Antoine
Re: mysql problem
You didn't read it and you didn't pay attention to statement in bold either. I could tell you what to do to fix it, but then you wouldn't learn from it. If it wasn't explain there, I would be happy to tell you, but it is there and pretty clear as well. Daniel , When i post a message on the OpenBSD misc list it is because one of two reasons: 1) I want to report an error i found while testing OpenBSD, and by reporting it i might be helping the project, somebody might be able to fix it and the OS grows. 2) I could be asking for help to the OpenBSD users, as it was this case. I know this was not an OpenBSD or MySQL problem, but a configuration problem , and maybe some other OpenBSD user might have already been there and willing to help other OpenBSD users to work things out. If you are an OpenBSD developer then i must tell you that i understand your 'I could tell you what to do to fix it, but then you wouldn't learn from it' attitude . It's logic to think that developers want users to learn how to handle the OS and how to properly use it. If you are not an OpenBSD developer, but an OpenBSD user instead , then i must tell you that your 'I could tell you what to do to fix it, but then you wouldn't learn from it' attitude just sucks. I was asking for help, i mentioned that this was a production server with 100 databases on it and i was urged to solve it fast. That's why i asked help to other OpenBSD users who might have suffered this problem on a production server and needed to solve it fast. But i will take a shot and assume you are just another OpenBSD user, just like me and many others looking for help in this list . So , Daniel consider this : Next time i ask for help on this list , my post won't be meant to be answered by you , i now know that you don't have a helping community spirit but a 'bofh' attitude instead probably due to a wannabeadeveloper feeling. If you want to help a user to solve his problems that's just fine, but to talk other users in that tone, to me for example, i won't allow it.
Re: mysql problem
Marcos Laufer wrote: You didn't read it and you didn't pay attention to statement in bold either. I could tell you what to do to fix it, but then you wouldn't learn from it. If it wasn't explain there, I would be happy to tell you, but it is there and pretty clear as well. Daniel , When i post a message on the OpenBSD misc list it is because one of two reasons: 1) I want to report an error i found while testing OpenBSD, and by reporting it i might be helping the project, somebody might be able to fix it and the OS grows. 2) I could be asking for help to the OpenBSD users, as it was this case. I know this was not an OpenBSD or MySQL problem, but a configuration problem , and maybe some other OpenBSD user might have already been there and willing to help other OpenBSD users to work things out. If you are an OpenBSD developer then i must tell you that i understand your 'I could tell you what to do to fix it, but then you wouldn't learn from it' attitude . It's logic to think that developers want users to learn how to handle the OS and how to properly use it. If you are not an OpenBSD developer, but an OpenBSD user instead , then i must tell you that your 'I could tell you what to do to fix it, but then you wouldn't learn from it' attitude just sucks. I was asking for help, i mentioned that this was a production server with 100 databases on it and i was urged to solve it fast. That's why i asked help to other OpenBSD users who might have suffered this problem on a production server and needed to solve it fast. But i will take a shot and assume you are just another OpenBSD user, just like me and many others looking for help in this list . So , Daniel consider this : Next time i ask for help on this list , my post won't be meant to be answered by you , i now know that you don't have a helping community spirit but a 'bofh' attitude instead probably due to a wannabeadeveloper feeling. If you want to help a user to solve his problems that's just fine, but to talk other users in that tone, to me for example, i won't allow it. Something you seem to have forgotten. OpenBSD is done by and for the developers. According to the priorities and whims of the developers. There is a difference in the approach and the results between quick fixes and reasoned rational understanding. I follow this list because the view is actually more useful for non-OBSD systems than the stuff that should be relevant. Actually this list is extremely helpful and tolerant.
Re: mysql problem
Marcos Laufer wrote: When i post a message on the OpenBSD misc list it is because one of two reasons: Mostly one looks like. 1) I want to report an error i found while testing OpenBSD, and by reporting it i might be helping the project, somebody might be able to fix it and the OS grows. 2) I could be asking for help to the OpenBSD users, as it was this case. I know this was not an OpenBSD or MySQL problem, but a configuration problem , and maybe some other OpenBSD user might have already been there and willing to help other OpenBSD users to work things out. And you got a lots of help from many. Just for fun however, I looked to see how many times you actually help or reply, versus how many times you actually started a tread asking for help, or provided not helpful feedback but added to complains: http://marc.info/?a=11490241131r=1w=2 You do as you see fit, but doesn't look to me a lots of help, but mostly request. So, take, but gave back I am not saying I help as much as many on this list, some are very, very helpful, but I do my share when I know the answer, or can help anyway. If you are an OpenBSD developer then i must tell you that i understand your 'I could tell you what to do to fix it, but then you wouldn't learn from it' attitude . It's logic to think that developers want users to learn how to handle the OS and how to properly use it. If you are not an OpenBSD developer, but an OpenBSD user instead , then i must tell you that your 'I could tell you what to do to fix it, but then you wouldn't learn from it' attitude just sucks. I was asking for help, i mentioned that this was a production server with 100 databases on it and i was urged to solve it fast. That's why i asked help to other OpenBSD users who might have suffered this problem on a production server and needed to solve it fast. But i will take a shot and assume you are just another OpenBSD user, just like me and many others looking for help in this list . So , Daniel consider this : Next time i ask for help on this list , my post won't be meant to be answered by you , i now know that you don't have a helping community spirit but a 'bofh' attitude instead probably due to a wannabeadeveloper feeling. If you want to help a user to solve his problems that's just fine, but to talk other users in that tone, to me for example, i won't allow it. You got many replies to help you and tell you exactly where to look. How can it be more specific then that? You get the error #9 that is exactly explain there and instructions on how to address that is provided as well. In short your calls wasn't use properly. The rest is for you to find why in your case. Your problem was as you explain it to a modification on the mysqld_safe script, so instead of complaining to me, or others for help we extended to you and pointed you where the problem was, may be you should kick the head of the admin that actually did something very stupid here in the first place by changing application script instead of doing a properly done setup! In the end, it still stand. The error was with not using the class properly, period. I said that it's important to learn from it, then you just learn that changing scripts to fix an issue quickly instead of doing the right thing will bit you in the future. Granted as you said it wasn't you, so you got stuck by it, so be it. But don't get upset at me for helping you as no one could have told you that the problem was in the script changed, but that your setup simply didn't use the class properly and that's what the problem was. Up to you to find out why in your setup. Even in the same document I explain how to test the exact error you got, error #9 by doing this: mysqlcheck -m -A -uYourUsers -pYourPassword If you get the error #9, then you simply don't use that class properly. I think I provided you as much help as I could possibly have done in this instance. It's pretty obvious. Get upset to the one that did this stupid thing and learn from it. In the end, you can be upset, but still the document that you read and work with still I wrote it and it help you anyway. So, you can say what ever you want, I still helped you, even if you don't like it. But if that make you fell better and relieve your frustrations, sure you can get upset at me. I have a pretty think skin and seen way worst as well. Learn to get upset at the right people. So, you are welcome! Best, Daniel
Re: mysql problem
Ok , i had followed the instructions at http://openbsdsupport.org/mysql.htm And now i have this configuration: I start mysql with this script: # cat /usr/local/bin/mysql.start if [ -x /usr/local/bin/mysqld_safe ] ; then su -c _mysql root -c '/usr/local/bin/mysqld_safe ' /dev/null echo -n ' mysql' fi That properly starts it with the correct login class. My login.conf for mysql is: _mysql:\ # :openfiles=8192:\ :openfiles=infinity:\ :datasize=infinity:\ :maxproc=infinity:\ #:openfiles-cur=8192:\ :openfiles-cur=infinity:\ #:openfiles-max=1:\ :openfiles-max=infinity:\ :stacksize-cur=8M: I want to set infinity on those now just for testing, if everything works fine i will put some limits there. My kern.maxfiles: # sysctl kern.maxfiles kern.maxfiles=2 And my.cnf has : [mysqld] socket = /var/www/logs/mysql/mysql.sock old-passwords tmpdir = /var/mysql/tmp open_files_limit = 1 max_connections = 4096 sql-mode = MYSQL40 skip-name-resolve table_cache = 5000 query_cache_size = 64M thread_cache = 32 key_buffer = 128M long_query_time = 5 thread_concurrency = 2 interactive_timeout=60 wait_timeout=60 connect_timeout=15 record_buffer=8M basedir=/usr/local datadir=/var/mysql sort_buffer_size = 32M read_buffer_size = 2M read_rnd_buffer_size = 4M myisam_sort_buffer_size = 64M [mysql.server] old-passwords [mysqld_safe] open-files=8192 open_files_limit = 1 max_connections = 4096 [mysqlcheck] socket = /var/www/logs/mysql/mysql.sock -- The server has more than 100 databases, it's been working fine for about a year . A couple of days ago i found that no database could be accessed . Errors like this appear: 070714 16:15:57 [ERROR] /usr/local/libexec/mysqld: Can't find file: './ip041271_tan1/mos_weblinks.frm' (errno: 9) 070714 16:15:57 [ERROR] /usr/local/libexec/mysqld: Can't find file: './ip041271_tan1/mos_weblinks.frm' (errno: 9) I restart the server and everything goes back to normal , but i reach my limits if i execute a: mysqlcheck -m -A -p By the moment the limits are reached, i noticed that this values Open_files and Opened_tables reached: mysql show status like '%Open%'; ++---+ | Variable_name | Value | ++---+ | Com_ha_open| 0 | | Com_show_open_tables | 0 | | Open_files | 2031 | | Open_streams | 0 | | Open_tables| 1053 | | Opened_tables | 0 | | Slave_open_temp_tables | 0 | ++---+ 7 rows in set (0.00 sec) or for example mysql show status like 'open%'; +---+---+ | Variable_name | Value | +---+---+ | Open_files| 2030 | | Open_streams | 0 | | Open_tables | 1077 | | Opened_tables | 0 | +---+---+ 4 rows in set (0.00 sec) I know i must be doing something wrong, but i just can't find out what . I still don't know why i reach limits with mysqlcheck when i am setting all those values right. I guess the limit i'm reaching is Open_files . The question is , why? Regards, Marcos
Re: mysql problem
On Sun, 15 Jul 2007, Marcos Laufer wrote: Ok , i had followed the instructions at http://openbsdsupport.org/mysql.htm No you did not. You plugged in bigger numbers. That could very well be your problem. Also there should be some correspondence to the numbers in login.conf and my.cnf. Another thing to watch out for: the login.conf syntax is extremely unforgiving, an extra space or tab after a \ can ruin your day. -Otto And now i have this configuration: I start mysql with this script: # cat /usr/local/bin/mysql.start if [ -x /usr/local/bin/mysqld_safe ] ; then su -c _mysql root -c '/usr/local/bin/mysqld_safe ' /dev/null echo -n ' mysql' fi That properly starts it with the correct login class. My login.conf for mysql is: _mysql:\ # :openfiles=8192:\ :openfiles=infinity:\ :datasize=infinity:\ :maxproc=infinity:\ #:openfiles-cur=8192:\ :openfiles-cur=infinity:\ #:openfiles-max=1:\ :openfiles-max=infinity:\ :stacksize-cur=8M: I want to set infinity on those now just for testing, if everything works fine i will put some limits there. My kern.maxfiles: # sysctl kern.maxfiles kern.maxfiles=2 And my.cnf has : [mysqld] socket = /var/www/logs/mysql/mysql.sock old-passwords tmpdir = /var/mysql/tmp open_files_limit = 1 max_connections = 4096 sql-mode = MYSQL40 skip-name-resolve table_cache = 5000 query_cache_size = 64M thread_cache = 32 key_buffer = 128M long_query_time = 5 thread_concurrency = 2 interactive_timeout=60 wait_timeout=60 connect_timeout=15 record_buffer=8M basedir=/usr/local datadir=/var/mysql sort_buffer_size = 32M read_buffer_size = 2M read_rnd_buffer_size = 4M myisam_sort_buffer_size = 64M [mysql.server] old-passwords [mysqld_safe] open-files=8192 open_files_limit = 1 max_connections = 4096 [mysqlcheck] socket = /var/www/logs/mysql/mysql.sock -- The server has more than 100 databases, it's been working fine for about a year . A couple of days ago i found that no database could be accessed . Errors like this appear: 070714 16:15:57 [ERROR] /usr/local/libexec/mysqld: Can't find file: './ip041271_tan1/mos_weblinks.frm' (errno: 9) 070714 16:15:57 [ERROR] /usr/local/libexec/mysqld: Can't find file: './ip041271_tan1/mos_weblinks.frm' (errno: 9) I restart the server and everything goes back to normal , but i reach my limits if i execute a: mysqlcheck -m -A -p By the moment the limits are reached, i noticed that this values Open_files and Opened_tables reached: mysql show status like '%Open%'; ++---+ | Variable_name | Value | ++---+ | Com_ha_open| 0 | | Com_show_open_tables | 0 | | Open_files | 2031 | | Open_streams | 0 | | Open_tables| 1053 | | Opened_tables | 0 | | Slave_open_temp_tables | 0 | ++---+ 7 rows in set (0.00 sec) or for example mysql show status like 'open%'; +---+---+ | Variable_name | Value | +---+---+ | Open_files| 2030 | | Open_streams | 0 | | Open_tables | 1077 | | Opened_tables | 0 | +---+---+ 4 rows in set (0.00 sec) I know i must be doing something wrong, but i just can't find out what . I still don't know why i reach limits with mysqlcheck when i am setting all those values right. I guess the limit i'm reaching is Open_files . The question is , why? Regards, Marcos
Re: mysql problem
Marcos Laufer wrote: Ok , i had followed the instructions at http://openbsdsupport.org/mysql.htm Go back and read again many times over until you get it. You didn't read it and you didn't pay attention to statement in bold either. I could tell you what to do to fix it, but then you wouldn't learn from it. If it wasn't explain there, I would be happy to tell you, but it is there and pretty clear as well. You get the error #9 that is exactly explain there and instructions on how to address that is provided as well. Read it please and you will see your mistake. Just a hint in the text: Remember, if you don't do this, it will use the default class! Same if you restart MySQL manually! Class are read and use on login Hope this help you. Also, there is reference to man pages there. You looked at them too right? Best, Daniel
Re: mysql problem
Marcos Laufer wrote: Ok , i had followed the instructions at http://openbsdsupport.org/mysql.htm I also forgot to add this as well in my previous reply, also in the text of the document you have been pointed to. So, be wise and change what you need to change for your setup! But only what you need to absolutely change. Don't go nuts and start turning knobs left and right. That may well be what you need to do on some other Unix, or variations of... But on OpenBSD the default setup is really good and is done as such to protect youself. The bottom line is: don't change what you don't need to change and know what you do and why! So, just don't go put big numbers and any numbers anywhere to make it work. This will give you more problem in the future. Do what you need to do for your setup and just that. And more importantly, learn why you need to do them, it will help you in many others situations. Best, Daniel
Re: [solved] mysql problem
Otto , I did read it , many times. I did not just plugged in bigger numbers, i'd like to think that i know what i'm doing here . I increased the values acorrding to my hardware and mysql status that needed to be increased in order to improve performance. I made my login.conf and my.cnf correspond to each other also. I found this links very useful, these provide ways to monitor your mysql server, improve performance and some ways to determine when to increase some values and when to decrease some others. I know some users will benefit from these: http://hackmysql.com/mysqlreportguide http://www.ibm.com/developerworks/linux/library/l-tune-lamp-3.html http://www.mysqlperformanceblog.com The link http://openbsdsupport.org/mysql.htm doesn't help on how to improve mysql , but just how to start it and how to handle descriptors properly. There's no problem on following those instructions. I happened to find out that the problem on this case was not related to my configuration or openbsd itself, but to a modification on the mysqld_safe script made by the previous administrator of this server, i found this: -- echo Starting $MYSQLD daemon with databases from $DATADIR ulimit -a echo --- ulimit -n 2048 /dev/null 21 # FIX para open files echo --- ulimit -a -- So that was the reason i couldn't complete a full mysqlcheck on all databases, i was limited by that ulimit on mysqld_safe which wouldn't let me open more that 2048 files despite of what i configured in my.cnf. Regards, - Original Message - From: Otto Moerbeek [EMAIL PROTECTED] To: Marcos Laufer [EMAIL PROTECTED] Cc: misc@openbsd.org; [EMAIL PROTECTED]; Daniel Ouellet [EMAIL PROTECTED] Sent: Sunday, July 15, 2007 3:54 AM Subject: Re: mysql problem On Sun, 15 Jul 2007, Marcos Laufer wrote: Ok , i had followed the instructions at http://openbsdsupport.org/mysql.htm No you did not. You plugged in bigger numbers. That could very well be your problem. Also there should be some correspondence to the numbers in login.conf and my.cnf. Another thing to watch out for: the login.conf syntax is extremely unforgiving, an extra space or tab after a \ can ruin your day. -Otto And now i have this configuration: I start mysql with this script:
Re: mysql problem
Hi Marcos, These instructions work for me: http://www.openbsdsupport.org/mysql.htm HTH... Nico
Re: mysql problem
On Sat, Jul 14, 2007 at 11:52:05PM +0200, Nico Meijer wrote: These instructions work for me: http://www.openbsdsupport.org/mysql.htm Those are close to what I use, with some exceptions. If you follow that and understand *why* you're doing what you're doing, then you're on the path to goodness. -- Darrin Chandler| Phoenix BSD User Group | MetaBUG [EMAIL PROTECTED] | http://phxbug.org/ | http://metabug.org/ http://www.stilyagin.com/ | Daemons in the Desert | Global BUG Federation
Re: mysql problem
On 7/12/07, Marcos Laufer [EMAIL PROTECTED] wrote: ERROR 1018 (HY000): Can't read dir of './mysql/' (errno: 9) Use fstat(1) or similar tool to check the open files on the system, maybe you're bumping up against a limit somewhere? There is an old thread[1] on a similar topic which might apply to you. Gordon [1] http://marc.info/?t=11011880941r=1w=2
Re: mysql problem
I did read the archives, and it helped me to find out that restarting mysql fixes it for some time, and i increased the values several times but no luck. It starts working fine for a while but then again it fails . In the end i have this config right now and the problem persists, i can reproduce the problem just by executing mysqlcheck -m -A -p -- # sysctl kern.maxfiles kern.maxfiles=2 -- in login.conf: _mysql:\ :openfiles=8192:\ :datasize=infinity:\ :maxproc=infinity:\ :openfiles-cur=8192:\ :openfiles-max=1:\ :stacksize-cur=8M: in my.cnf: [mysqld] socket = /var/www/logs/mysql/mysql.sock old-passwords tmpdir = /var/mysql/tmp open-files-limit = 1 sql-mode = MYSQL40 skip-name-resolve table_cache = 1024 query_cache_size = 64M key_buffer = 64M long_query_time = 5 #log-slow-queries #log-queries-not-using-indexes thread_concurrency = 2 #query_cache_limit = 1M interactive_timeout=60 wait_timeout=60 connect_timeout=15 basedir=/usr/local datadir=/var/mysql sort_buffer_size = 1M read_buffer_size = 1M read_rnd_buffer_size = 4M myisam_sort_buffer_size = 64M [mysql.server] old-passwords [mysqld_safe] open-files=8192 Maybe i need to increase something else? Thanks! - Original Message - From: Otto Moerbeek [EMAIL PROTECTED] To: Marcos Laufer [EMAIL PROTECTED] Cc: misc@openbsd.org Sent: Friday, July 13, 2007 3:12 AM Subject: Re: mysql problem On Fri, 13 Jul 2007, Marcos Laufer wrote: I am having a very strange problem on a 3.9 , suddenly i can't access any table on the databases. I have around 100 databases on this server and can't access not even one. This is a production server and i am in an urge to solve it, if anyone can help i would appreciate it: # mysql mysql -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 303342 to server version: 5.0.18 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql show tables; ERROR 1018 (HY000): Can't read dir of './mysql/' (errno: 9) mysql I have backups of all databases, including mysql database which i think is the one broken , how can i restore it ? Thanks for your help You are running out of file descriptors. Search the archives for answers. -Otto
Re: mysql problem
On Fri, 13 Jul 2007, Marcos Laufer wrote: I am having a very strange problem on a 3.9 , suddenly i can't access any table on the databases. I have around 100 databases on this server and can't access not even one. This is a production server and i am in an urge to solve it, if anyone can help i would appreciate it: # mysql mysql -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 303342 to server version: 5.0.18 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql show tables; ERROR 1018 (HY000): Can't read dir of './mysql/' (errno: 9) mysql I have backups of all databases, including mysql database which i think is the one broken , how can i restore it ? Thanks for your help You are running out of file descriptors. Search the archives for answers. -Otto
Re: mysql problem
On Fri, 13 Jul 2007, Marcos Laufer wrote: I did read the archives, and it helped me to find out that restarting mysql fixes it for some time, and i increased the values several times but no luck. It starts working fine for a while but then again it fails . In the end i have this config right now and the problem persists, i can reproduce the problem just by executing mysqlcheck -m -A -p How are yo starting mysql? You need to explicitly set the login class. Somthing like su -c mysql root /usr/local/bin/mysqld_safe ... -Otto -- # sysctl kern.maxfiles kern.maxfiles=2 -- in login.conf: _mysql:\ :openfiles=8192:\ :datasize=infinity:\ :maxproc=infinity:\ :openfiles-cur=8192:\ :openfiles-max=1:\ :stacksize-cur=8M: in my.cnf: [mysqld] socket = /var/www/logs/mysql/mysql.sock old-passwords tmpdir = /var/mysql/tmp open-files-limit = 1 sql-mode = MYSQL40 skip-name-resolve table_cache = 1024 query_cache_size = 64M key_buffer = 64M long_query_time = 5 #log-slow-queries #log-queries-not-using-indexes thread_concurrency = 2 #query_cache_limit = 1M interactive_timeout=60 wait_timeout=60 connect_timeout=15 basedir=/usr/local datadir=/var/mysql sort_buffer_size = 1M read_buffer_size = 1M read_rnd_buffer_size = 4M myisam_sort_buffer_size = 64M [mysql.server] old-passwords [mysqld_safe] open-files=8192 Maybe i need to increase something else? Thanks! - Original Message - From: Otto Moerbeek [EMAIL PROTECTED] To: Marcos Laufer [EMAIL PROTECTED] Cc: misc@openbsd.org Sent: Friday, July 13, 2007 3:12 AM Subject: Re: mysql problem On Fri, 13 Jul 2007, Marcos Laufer wrote: I am having a very strange problem on a 3.9 , suddenly i can't access any table on the databases. I have around 100 databases on this server and can't access not even one. This is a production server and i am in an urge to solve it, if anyone can help i would appreciate it: # mysql mysql -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 303342 to server version: 5.0.18 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql show tables; ERROR 1018 (HY000): Can't read dir of './mysql/' (errno: 9) mysql I have backups of all databases, including mysql database which i think is the one broken , how can i restore it ? Thanks for your help You are running out of file descriptors. Search the archives for answers. -Otto
Re: mysql problem
I am , and i have a simple and nice script for starting and stopping it properly: # /usr/local/bin/my start cat /usr/local/bin/my #!/bin/sh # test -z $1 -o \( $1 != start -a $1 != stop \) \ echo syntax: $0 [start|stop] exit 1 exec /usr/local/share/mysql/mysql.server $1 /dev/null 21 -- and in mysql.server it says: # Set some defaults pid_file= server_pid_file= use_mysqld_safe=1 user=_mysql What do you think, should i add more openfiles to mysql? Regards, Marcos - Original Message - From: Otto Moerbeek [EMAIL PROTECTED] To: Marcos Laufer [EMAIL PROTECTED] Cc: misc@openbsd.org Sent: Friday, July 13, 2007 4:07 AM Subject: Re: mysql problem On Fri, 13 Jul 2007, Marcos Laufer wrote: I did read the archives, and it helped me to find out that restarting mysql fixes it for some time, and i increased the values several times but no luck. It starts working fine for a while but then again it fails . In the end i have this config right now and the problem persists, i can reproduce the problem just by executing mysqlcheck -m -A -p How are yo starting mysql? You need to explicitly set the login class. Somthing like su -c mysql root /usr/local/bin/mysqld_safe ... -Otto -- # sysctl kern.maxfiles kern.maxfiles=2 -- in login.conf: _mysql:\ :openfiles=8192:\ :datasize=infinity:\ :maxproc=infinity:\ :openfiles-cur=8192:\ :openfiles-max=1:\ :stacksize-cur=8M: in my.cnf: [mysqld] socket = /var/www/logs/mysql/mysql.sock old-passwords tmpdir = /var/mysql/tmp open-files-limit = 1 sql-mode = MYSQL40 skip-name-resolve table_cache = 1024 query_cache_size = 64M key_buffer = 64M long_query_time = 5 #log-slow-queries #log-queries-not-using-indexes thread_concurrency = 2 #query_cache_limit = 1M interactive_timeout=60 wait_timeout=60 connect_timeout=15 basedir=/usr/local datadir=/var/mysql sort_buffer_size = 1M read_buffer_size = 1M read_rnd_buffer_size = 4M myisam_sort_buffer_size = 64M [mysql.server] old-passwords [mysqld_safe] open-files=8192 Maybe i need to increase something else? Thanks! - Original Message - From: Otto Moerbeek [EMAIL PROTECTED] To: Marcos Laufer [EMAIL PROTECTED] Cc: misc@openbsd.org Sent: Friday, July 13, 2007 3:12 AM Subject: Re: mysql problem On Fri, 13 Jul 2007, Marcos Laufer wrote: I am having a very strange problem on a 3.9 , suddenly i can't access any table on the databases. I have around 100 databases on this server and can't access not even one. This is a production server and i am in an urge to solve it, if anyone can help i would appreciate it: # mysql mysql -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 303342 to server version: 5.0.18 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql show tables; ERROR 1018 (HY000): Can't read dir of './mysql/' (errno: 9) mysql I have backups of all databases, including mysql database which i think is the one broken , how can i restore it ? Thanks for your help You are running out of file descriptors. Search the archives for answers. -Otto
Re: mysql problem
On 2007/07/13 13:41, Marcos Laufer wrote: How are yo starting mysql? You need to explicitly set the login class. Somthing like su -c mysql root /usr/local/bin/mysqld_safe ... I am , and i have a simple and nice script for starting and stopping it properly: Where are you setting the login class (su -c) to actually use the login.conf settings for the mysql class? It's nowhere that you've shown us.
Re: mysql problem
You are setting the user, not the login class. You have made a login class _mysql in /etc/login.conf, but it looks like you may not have that as user _mysql's default login class. You need to either change user _mysql to be in the _mysql login class by default, (hint, chfn _mysql as root) OR, use the su command to start it as otto showed you. Note as well, that just setting it to use 8192 open files won't necessarily get you all the way there if the kernel doesn't have that many configured. You may also need to increase this if you *really* need that many: # sysctl kern.maxfiles kern.maxfiles=1772 -Bob * Marcos Laufer [EMAIL PROTECTED] [2007-07-13 10:46]: I am , and i have a simple and nice script for starting and stopping it properly: # /usr/local/bin/my start cat /usr/local/bin/my #!/bin/sh # test -z $1 -o \( $1 != start -a $1 != stop \) \ echo syntax: $0 [start|stop] exit 1 exec /usr/local/share/mysql/mysql.server $1 /dev/null 21 -- and in mysql.server it says: # Set some defaults pid_file= server_pid_file= use_mysqld_safe=1 user=_mysql What do you think, should i add more openfiles to mysql? Regards, Marcos - Original Message - From: Otto Moerbeek [EMAIL PROTECTED] To: Marcos Laufer [EMAIL PROTECTED] Cc: misc@openbsd.org Sent: Friday, July 13, 2007 4:07 AM Subject: Re: mysql problem On Fri, 13 Jul 2007, Marcos Laufer wrote: I did read the archives, and it helped me to find out that restarting mysql fixes it for some time, and i increased the values several times but no luck. It starts working fine for a while but then again it fails . In the end i have this config right now and the problem persists, i can reproduce the problem just by executing mysqlcheck -m -A -p How are yo starting mysql? You need to explicitly set the login class. Somthing like su -c mysql root /usr/local/bin/mysqld_safe ... -Otto -- # sysctl kern.maxfiles kern.maxfiles=2 -- in login.conf: _mysql:\ :openfiles=8192:\ :datasize=infinity:\ :maxproc=infinity:\ :openfiles-cur=8192:\ :openfiles-max=1:\ :stacksize-cur=8M: in my.cnf: [mysqld] socket = /var/www/logs/mysql/mysql.sock old-passwords tmpdir = /var/mysql/tmp open-files-limit = 1 sql-mode = MYSQL40 skip-name-resolve table_cache = 1024 query_cache_size = 64M key_buffer = 64M long_query_time = 5 #log-slow-queries #log-queries-not-using-indexes thread_concurrency = 2 #query_cache_limit = 1M interactive_timeout=60 wait_timeout=60 connect_timeout=15 basedir=/usr/local datadir=/var/mysql sort_buffer_size = 1M read_buffer_size = 1M read_rnd_buffer_size = 4M myisam_sort_buffer_size = 64M [mysql.server] old-passwords [mysqld_safe] open-files=8192 Maybe i need to increase something else? Thanks! - Original Message - From: Otto Moerbeek [EMAIL PROTECTED] To: Marcos Laufer [EMAIL PROTECTED] Cc: misc@openbsd.org Sent: Friday, July 13, 2007 3:12 AM Subject: Re: mysql problem On Fri, 13 Jul 2007, Marcos Laufer wrote: I am having a very strange problem on a 3.9 , suddenly i can't access any table on the databases. I have around 100 databases on this server and can't access not even one. This is a production server and i am in an urge to solve it, if anyone can help i would appreciate it: # mysql mysql -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 303342 to server version: 5.0.18 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql show tables; ERROR 1018 (HY000): Can't read dir of './mysql/' (errno: 9) mysql I have backups of all databases, including mysql database which i think is the one broken , how can i restore it ? Thanks for your help You are running out of file descriptors. Search the archives for answers. -Otto -- #!/usr/bin/perl if ((not 0 not 1) != (! 0 ! 1)) { print Larry and Tom must smoke some really primo stuff...\n; }
Re: mysql problem
Bob , i saw what you meant me to set, it was on the daemon login class , i changed it with chfn to _mysql . Tonight i will test it again with mysqlcheck -m -A -p to see if i still reach the limits. Thanks for your advice! Regards, Marcos - Original Message - From: Bob Beck [EMAIL PROTECTED] To: Marcos Laufer [EMAIL PROTECTED] Cc: Otto Moerbeek [EMAIL PROTECTED]; misc@openbsd.org Sent: Friday, July 13, 2007 1:54 PM Subject: Re: mysql problem You are setting the user, not the login class. You have made a login class _mysql in /etc/login.conf, but it looks like you may not have that as user _mysql's default login class. You need to either change user _mysql to be in the _mysql login class by default, (hint, chfn _mysql as root) OR, use the su command to start it as otto showed you. Note as well, that just setting it to use 8192 open files won't necessarily get you all the way there if the kernel doesn't have that many configured. You may also need to increase this if you *really* need that many: # sysctl kern.maxfiles kern.maxfiles=1772 -Bob * Marcos Laufer [EMAIL PROTECTED] [2007-07-13 10:46]: I am , and i have a simple and nice script for starting and stopping it properly: # /usr/local/bin/my start cat /usr/local/bin/my #!/bin/sh # test -z $1 -o \( $1 != start -a $1 != stop \) \ echo syntax: $0 [start|stop] exit 1 exec /usr/local/share/mysql/mysql.server $1 /dev/null 21 -- and in mysql.server it says: # Set some defaults pid_file= server_pid_file= use_mysqld_safe=1 user=_mysql What do you think, should i add more openfiles to mysql? Regards, Marcos - Original Message - From: Otto Moerbeek [EMAIL PROTECTED] To: Marcos Laufer [EMAIL PROTECTED] Cc: misc@openbsd.org Sent: Friday, July 13, 2007 4:07 AM Subject: Re: mysql problem On Fri, 13 Jul 2007, Marcos Laufer wrote: I did read the archives, and it helped me to find out that restarting mysql fixes it for some time, and i increased the values several times but no luck. It starts working fine for a while but then again it fails . In the end i have this config right now and the problem persists, i can reproduce the problem just by executing mysqlcheck -m -A -p How are yo starting mysql? You need to explicitly set the login class. Somthing like su -c mysql root /usr/local/bin/mysqld_safe ... -Otto -- # sysctl kern.maxfiles kern.maxfiles=2 -- in login.conf: _mysql:\ :openfiles=8192:\ :datasize=infinity:\ :maxproc=infinity:\ :openfiles-cur=8192:\ :openfiles-max=1:\ :stacksize-cur=8M: in my.cnf: [mysqld] socket = /var/www/logs/mysql/mysql.sock old-passwords tmpdir = /var/mysql/tmp open-files-limit = 1 sql-mode = MYSQL40 skip-name-resolve table_cache = 1024 query_cache_size = 64M key_buffer = 64M long_query_time = 5 #log-slow-queries #log-queries-not-using-indexes thread_concurrency = 2 #query_cache_limit = 1M interactive_timeout=60 wait_timeout=60 connect_timeout=15 basedir=/usr/local datadir=/var/mysql sort_buffer_size = 1M read_buffer_size = 1M read_rnd_buffer_size = 4M myisam_sort_buffer_size = 64M [mysql.server] old-passwords [mysqld_safe] open-files=8192 Maybe i need to increase something else? Thanks! - Original Message - From: Otto Moerbeek [EMAIL PROTECTED] To: Marcos Laufer [EMAIL PROTECTED] Cc: misc@openbsd.org Sent: Friday, July 13, 2007 3:12 AM Subject: Re: mysql problem On Fri, 13 Jul 2007, Marcos Laufer wrote: I am having a very strange problem on a 3.9 , suddenly i can't access any table on the databases. I have around 100 databases on this server and can't access not even one. This is a production server and i am in an urge to solve it, if anyone can help i would appreciate it: # mysql mysql -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 303342 to server version: 5.0.18 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql show tables; ERROR 1018 (HY000): Can't read dir of './mysql/' (errno: 9) mysql I have backups of all databases, including mysql database which i think is the one broken , how can i restore it ? Thanks for your help You are running out of file descriptors. Search the archives for answers. -Otto -- #!/usr/bin/perl if ((not 0 not 1) != (! 0 ! 1)) { print Larry and Tom must smoke some really primo stuff...\n; }
Re: mysql problem
On Fri, 13 Jul 2007, Marcos Laufer wrote: Bob , i saw what you meant me to set, it was on the daemon login class , i changed it with chfn to _mysql . Tonight i will test it again with mysqlcheck -m -A -p to see if i still reach the limits. When starting a program, the login class is not changed unless explictly overridden. Setting the default login class of a user won't help. You need to do what I wrote earlier: use sudo -c class user command... -Otto Thanks for your advice! Regards, Marcos - Original Message - From: Bob Beck [EMAIL PROTECTED] To: Marcos Laufer [EMAIL PROTECTED] Cc: Otto Moerbeek [EMAIL PROTECTED]; misc@openbsd.org Sent: Friday, July 13, 2007 1:54 PM Subject: Re: mysql problem You are setting the user, not the login class. You have made a login class _mysql in /etc/login.conf, but it looks like you may not have that as user _mysql's default login class. You need to either change user _mysql to be in the _mysql login class by default, (hint, chfn _mysql as root) OR, use the su command to start it as otto showed you. Note as well, that just setting it to use 8192 open files won't necessarily get you all the way there if the kernel doesn't have that many configured. You may also need to increase this if you *really* need that many: # sysctl kern.maxfiles kern.maxfiles=1772 -Bob * Marcos Laufer [EMAIL PROTECTED] [2007-07-13 10:46]: I am , and i have a simple and nice script for starting and stopping it properly: # /usr/local/bin/my start cat /usr/local/bin/my #!/bin/sh # test -z $1 -o \( $1 != start -a $1 != stop \) \ echo syntax: $0 [start|stop] exit 1 exec /usr/local/share/mysql/mysql.server $1 /dev/null 21 -- and in mysql.server it says: # Set some defaults pid_file= server_pid_file= use_mysqld_safe=1 user=_mysql What do you think, should i add more openfiles to mysql? Regards, Marcos - Original Message - From: Otto Moerbeek [EMAIL PROTECTED] To: Marcos Laufer [EMAIL PROTECTED] Cc: misc@openbsd.org Sent: Friday, July 13, 2007 4:07 AM Subject: Re: mysql problem On Fri, 13 Jul 2007, Marcos Laufer wrote: I did read the archives, and it helped me to find out that restarting mysql fixes it for some time, and i increased the values several times but no luck. It starts working fine for a while but then again it fails . In the end i have this config right now and the problem persists, i can reproduce the problem just by executing mysqlcheck -m -A -p How are yo starting mysql? You need to explicitly set the login class. Somthing like su -c mysql root /usr/local/bin/mysqld_safe ... -Otto -- # sysctl kern.maxfiles kern.maxfiles=2 -- in login.conf: _mysql:\ :openfiles=8192:\ :datasize=infinity:\ :maxproc=infinity:\ :openfiles-cur=8192:\ :openfiles-max=1:\ :stacksize-cur=8M: in my.cnf: [mysqld] socket = /var/www/logs/mysql/mysql.sock old-passwords tmpdir = /var/mysql/tmp open-files-limit = 1 sql-mode = MYSQL40 skip-name-resolve table_cache = 1024 query_cache_size = 64M key_buffer = 64M long_query_time = 5 #log-slow-queries #log-queries-not-using-indexes thread_concurrency = 2 #query_cache_limit = 1M interactive_timeout=60 wait_timeout=60 connect_timeout=15 basedir=/usr/local datadir=/var/mysql sort_buffer_size = 1M read_buffer_size = 1M read_rnd_buffer_size = 4M myisam_sort_buffer_size = 64M [mysql.server] old-passwords [mysqld_safe] open-files=8192 Maybe i need to increase something else? Thanks! - Original Message - From: Otto Moerbeek [EMAIL PROTECTED] To: Marcos Laufer [EMAIL PROTECTED] Cc: misc@openbsd.org Sent: Friday, July 13, 2007 3:12 AM Subject: Re: mysql problem On Fri, 13 Jul 2007, Marcos Laufer wrote: I am having a very strange problem on a 3.9 , suddenly i can't access any table on the databases. I have around 100 databases on this server and can't access not even one. This is a production server and i am in an urge to solve it, if anyone can help i would appreciate it: # mysql mysql -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 303342 to server version: 5.0.18 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql show tables; ERROR 1018 (HY000): Can't read dir of './mysql/' (errno: 9) mysql I have backups of all databases, including mysql database which i think is the one broken , how can i restore it ? Thanks for your help You are running out of file
Re: mysql problem
Otto Moerbeek wrote: On Fri, 13 Jul 2007, Marcos Laufer wrote: I did read the archives, and it helped me to find out that restarting mysql fixes it for some time, and i increased the values several times but no luck. It starts working fine for a while but then again it fails . In the end i have this config right now and the problem persists, i can reproduce the problem just by executing mysqlcheck -m -A -p How are yo starting mysql? You need to explicitly set the login class. Somthing like su -c mysql root /usr/local/bin/mysqld_safe ... -Otto Otto is right. Here is my /etc/postgresql.rc script, which should give you some ideas for managing mysql (notice ``SU''). #!/bin/sh exec 2 DATA=/var/postgresql/data LOG=/var/postgresql/log CMD=$1 PUSR=_postgresql PCLS=postgresql CTL=/usr/local/bin/pg_ctl SU=su -l -c $PCLS $PUSR -c userinfo -e $PUSR || { echo $PUSR user nonexistent.; exit 1; } grep -q ^${PCLS}: /etc/login.conf || { echo $PCLS class nonexistent.; exit 1; } [ -x $CTL ] || { echo $CTL not executable.; exit 1; } case $CMD in stop|reload|status) $SU exec $CTL $CMD -D $DATA ;; start|restart) $SU exec $CTL $CMD -D $DATA -l $LOG chmod 644 $LOG ;; *) echo usage: $0 stop|restart|reload|status|start (will run as $PUSR) ;; esac And the relevant sections of /etc/login.conf daemon:\ :ignorenologin:\ :datasize=infinity:\ :maxproc=infinity:\ :openfiles-cur=128:\ :stacksize-cur=8M:\ :localcipher=blowfish,8:\ :tc=default: postgresql:\ :openfiles-cur=768:\ :tc=daemon: -pachl -- # sysctl kern.maxfiles kern.maxfiles=2 -- in login.conf: _mysql:\ :openfiles=8192:\ :datasize=infinity:\ :maxproc=infinity:\ :openfiles-cur=8192:\ :openfiles-max=1:\ :stacksize-cur=8M: in my.cnf: [mysqld] socket = /var/www/logs/mysql/mysql.sock old-passwords tmpdir = /var/mysql/tmp open-files-limit = 1 sql-mode = MYSQL40 skip-name-resolve table_cache = 1024 query_cache_size = 64M key_buffer = 64M long_query_time = 5 #log-slow-queries #log-queries-not-using-indexes thread_concurrency = 2 #query_cache_limit = 1M interactive_timeout=60 wait_timeout=60 connect_timeout=15 basedir=/usr/local datadir=/var/mysql sort_buffer_size = 1M read_buffer_size = 1M read_rnd_buffer_size = 4M myisam_sort_buffer_size = 64M [mysql.server] old-passwords [mysqld_safe] open-files=8192 Maybe i need to increase something else? Thanks! - Original Message - From: Otto Moerbeek [EMAIL PROTECTED] To: Marcos Laufer [EMAIL PROTECTED] Cc: misc@openbsd.org Sent: Friday, July 13, 2007 3:12 AM Subject: Re: mysql problem On Fri, 13 Jul 2007, Marcos Laufer wrote: I am having a very strange problem on a 3.9 , suddenly i can't access any table on the databases. I have around 100 databases on this server and can't access not even one. This is a production server and i am in an urge to solve it, if anyone can help i would appreciate it: # mysql mysql -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 303342 to server version: 5.0.18 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql show tables; ERROR 1018 (HY000): Can't read dir of './mysql/' (errno: 9) mysql I have backups of all databases, including mysql database which i think is the one broken , how can i restore it ? Thanks for your help You are running out of file descriptors. Search the archives for answers. -Otto
Re: mysql problem
Allright the, i start the mysql server with this: if [ -x /usr/local/bin/mysqld_safe ] ; then su -c _mysql root -c '/usr/local/bin/mysqld_safe ' /dev/null echo -n ' mysql' fi but the problem still persists , it shows up when executing mysqlcheck -m -A -p Now what? Regards, Marcos - Original Message - From: Clint Pachl [EMAIL PROTECTED] Cc: Marcos Laufer [EMAIL PROTECTED]; misc@openbsd.org Sent: Friday, July 13, 2007 6:05 PM Subject: Re: mysql problem Otto Moerbeek wrote: On Fri, 13 Jul 2007, Marcos Laufer wrote: I did read the archives, and it helped me to find out that restarting mysql fixes it for some time, and i increased the values several times but no luck. It starts working fine for a while but then again it fails . In the end i have this config right now and the problem persists, i can reproduce the problem just by executing mysqlcheck -m -A -p How are yo starting mysql? You need to explicitly set the login class. Somthing like su -c mysql root /usr/local/bin/mysqld_safe ... -Otto Otto is right. Here is my /etc/postgresql.rc script, which should give you some ideas for managing mysql (notice ``SU''). #!/bin/sh exec 2 DATA=/var/postgresql/data LOG=/var/postgresql/log CMD=$1 PUSR=_postgresql PCLS=postgresql CTL=/usr/local/bin/pg_ctl SU=su -l -c $PCLS $PUSR -c userinfo -e $PUSR || { echo $PUSR user nonexistent.; exit 1; } grep -q ^${PCLS}: /etc/login.conf || { echo $PCLS class nonexistent.; exit 1; } [ -x $CTL ] || { echo $CTL not executable.; exit 1; } case $CMD in stop|reload|status) $SU exec $CTL $CMD -D $DATA ;; start|restart) $SU exec $CTL $CMD -D $DATA -l $LOG chmod 644 $LOG ;; *) echo usage: $0 stop|restart|reload|status|start (will run as $PUSR) ;; esac And the relevant sections of /etc/login.conf daemon:\ :ignorenologin:\ :datasize=infinity:\ :maxproc=infinity:\ :openfiles-cur=128:\ :stacksize-cur=8M:\ :localcipher=blowfish,8:\ :tc=default: postgresql:\ :openfiles-cur=768:\ :tc=daemon: -pachl -- # sysctl kern.maxfiles kern.maxfiles=2 --
Re: mysql problem
Marcos Laufer wrote: Allright the, i start the mysql server with this: if [ -x /usr/local/bin/mysqld_safe ] ; then su -c _mysql root -c '/usr/local/bin/mysqld_safe ' /dev/null echo -n ' mysql' fi but the problem still persists , it shows up when executing mysqlcheck -m -A -p Now what? Regards, Marcos - Original Message - From: Clint Pachl [EMAIL PROTECTED] Cc: Marcos Laufer [EMAIL PROTECTED]; misc@openbsd.org Sent: Friday, July 13, 2007 6:05 PM Subject: Re: mysql problem Otto Moerbeek wrote: On Fri, 13 Jul 2007, Marcos Laufer wrote: I did read the archives, and it helped me to find out that restarting mysql fixes it for some time, and i increased the values several times but no luck. It starts working fine for a while but then again it fails . In the end i have this config right now and the problem persists, i can reproduce the problem just by executing mysqlcheck -m -A -p How are yo starting mysql? You need to explicitly set the login class. Somthing like su -c mysql root /usr/local/bin/mysqld_safe ... -Otto Otto is right. Here is my /etc/postgresql.rc script, which should give you some ideas for managing mysql (notice ``SU''). #!/bin/sh exec 2 DATA=/var/postgresql/data LOG=/var/postgresql/log CMD=$1 PUSR=_postgresql PCLS=postgresql CTL=/usr/local/bin/pg_ctl SU=su -l -c $PCLS $PUSR -c userinfo -e $PUSR || { echo $PUSR user nonexistent.; exit 1; } grep -q ^${PCLS}: /etc/login.conf || { echo $PCLS class nonexistent.; exit 1; } [ -x $CTL ] || { echo $CTL not executable.; exit 1; } case $CMD in stop|reload|status) $SU exec $CTL $CMD -D $DATA ;; start|restart) $SU exec $CTL $CMD -D $DATA -l $LOG chmod 644 $LOG ;; *) echo usage: $0 stop|restart|reload|status|start (will run as $PUSR) ;; esac And the relevant sections of /etc/login.conf daemon:\ :ignorenologin:\ :datasize=infinity:\ :maxproc=infinity:\ :openfiles-cur=128:\ :stacksize-cur=8M:\ :localcipher=blowfish,8:\ :tc=default: postgresql:\ :openfiles-cur=768:\ :tc=daemon: -pachl -- # sysctl kern.maxfiles kern.maxfiles=2 Try... http://www.openbsdsupport.org/mysql.htm Solved my problem. Good Luck, Steve W. --
Re: mysql problem
Marcos Laufer wrote: Now what? http://openbsdsupport.org/mysql.htm
mysql problem
I am having a very strange problem on a 3.9 , suddenly i can't access any table on the databases. I have around 100 databases on this server and can't access not even one. This is a production server and i am in an urge to solve it, if anyone can help i would appreciate it: # mysql mysql -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 303342 to server version: 5.0.18 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql show tables; ERROR 1018 (HY000): Can't read dir of './mysql/' (errno: 9) mysql I have backups of all databases, including mysql database which i think is the one broken , how can i restore it ? Thanks for your help
snort any interface and 2.6.1.4 mysql problem
Hi All, I have more than one interface I need to monitor with snort. I've read http://www.snort.org/docs/faq/1Q05/node35.html, To do that, I've created bridge0 and added both interfaces. Since I need to assign IP addresses to each interface, I could not just up the interfaces and add them to the bridge. Perhaps that's the reason, but I don't see alarms triggered with -i bridge0 (snort warns that no IP is assigned to bridge0 anyways). Do I need to do anything else? Using 0.0.0.0 or any as HOME_NET (as mentioned somewhere) doesn't help at all. Perhaps http://www.monkey.org/openbsd/archive/misc/0203/msg01194.html could be helpful, but I can't see how. I couldn't find how to create an any interface on OpenBSD, I would appreciate any links/comments. Otherwise, what I do is to run multiple instances of snort for each interface, which wastes my shared memory. Also, I've compiled 2.6.1.4 mysql enabled, but for some reason snort complains that it cannot connect to mysql via mysql.sock file. But on the same system I don't have any problem connecting to mysql using mysql-enabled 2.4.5 package, so I don't believe there is any problem with my mysql settings or file permissions (I cannot use 2.4.5-mysql due to timestamp problems I mentioned on another post). To make sure I'm not doing anything wrong, I've modified the ports Makefile and compiled using ports, but I have the same problem. Isn't it enough to configure snort with --with-mysql? And if the build is successful, what can be wrong? I'm sorry if I'm asking too many snort related questions. Thanks,
Chrooted CGI+Mysql Problem
Hello all, I've been playing around with database driven web stuff lately in the chrooted apache. I've got a pretty simple CGI written in C that selects all of my blog entries from a database and displays them in a web page. I got things working running httpd with the -u flag and now i'm attempting to chroot everything. A ldd on /cgi-bin/blogger reveals: /usr/local/lib/libmysqlclient.so.12.0 /usr/lib/libz.so.4.0 /usr/lib/libc.so.34.2 so I created the directory structure and copied those libraries into them, however when I run the cgi I see in my logs: can't load library 'libmysqlclient.so.12.0' I'm trying to recompile mysql in ports with the static linking enabled don't know if that will help, but I figured I'd ask the list to see if anyone else has seen this problem before. Thanks guys. Brandon
Re: Chrooted CGI+Mysql Problem
Brandon Mercer wrote: Hello all, I've been playing around with database driven web stuff lately in the chrooted apache. I've got a pretty simple CGI written in C that selects all of my blog entries from a database and displays them in a web page. I got things working running httpd with the -u flag and now i'm attempting to chroot everything. A ldd on /cgi-bin/blogger reveals: /usr/local/lib/libmysqlclient.so.12.0 /usr/lib/libz.so.4.0 /usr/lib/libc.so.34.2 so I created the directory structure and copied those libraries into them, however when I run the cgi I see in my logs: can't load library 'libmysqlclient.so.12.0' I'm trying to recompile mysql in ports with the static linking enabled don't know if that will help, but I figured I'd ask the list to see if anyone else has seen this problem before. Thanks guys. Simplest thing to do copy /usr/local/lib/libmysqlclient.so.12.0 to the chrooted /var/www/usr/lib folder all is well. :-) Brandon
Re: PHP or Mysql problem?
James Strandboge wrote: On Wed, 2005-06-15 at 11:30 +0200, Nico Meijer wrote: Hi Kiraly, mysql error: Can't create/write to file '/tmp/ #sql_4c99_0.MYD' (Errcode: 9) MySQL problem. Simple suggestions, not idiot-proof: I prefer this on OpenBSD 3.6 (should be same on 3.7): Add to /etc/login.conf: # # for mysql to work right # mysql:\ :datasize=infinity:\ :maxproc=infinity:\ :openfiles-cur=2048:\ :openfiles-max=8192:\ :stacksize-cur=8M:\ :localcipher=blowfish,8:\ :tc=default: sudo vipw and change the login class for _mysql to 'mysql'. Hmm .. why don't you just add a _mysql loginprofile in login.conf in the first place instead of adding oldstyle mysql and then change pw db. Seems backwards to me. /per [EMAIL PROTECTED] To use this class, you MUST use 'sudo -c mysql -u _mysql', like this (can be put in /etc/rc.local): sudo -c mysql -u _mysql /usr/local/sbin/mysql.server start This may be useful as well (can also put in /etc/sysctl.conf): sudo sysctl -w kern.maxfiles=16384 And finally, add to /etc/my.cnf on (OpenBSD 3.6 with mysql 4.0.20): [mysqld] ... open-files=1000 ... Jamie Strandboge
Re: PHP or Mysql problem?
On Thu, 2005-06-16 at 09:22 +0200, Per Engelbrecht wrote: James Strandboge wrote: On Wed, 2005-06-15 at 11:30 +0200, Nico Meijer wrote: Hi Kiraly, mysql error: Can't create/write to file '/tmp/ #sql_4c99_0.MYD' (Errcode: 9) MySQL problem. Simple suggestions, not idiot-proof: I prefer this on OpenBSD 3.6 (should be same on 3.7): Add to /etc/login.conf: # # for mysql to work right # mysql:\ :datasize=infinity:\ :maxproc=infinity:\ :openfiles-cur=2048:\ :openfiles-max=8192:\ :stacksize-cur=8M:\ :localcipher=blowfish,8:\ :tc=default: sudo vipw and change the login class for _mysql to 'mysql'. Hmm .. why don't you just add a _mysql loginprofile in login.conf in the first place instead of adding oldstyle mysql and then change pw db. Seems backwards to me. I don't know how it is on 3.7 (like I said, this is on 3.6), but you have to update master.passwd with the new login class, since the default _mysql user doesn't have a login class specified. Whether you name that class in login.conf 'mysql' or '_mysql' is a matter of preference (though admittedly '_mysql' looks better). Jamie
Re: PHP or Mysql problem?
Kiraly Zoltan wrote: mysql error: Can't create/write to file '/tmp/#sql_4c99_0.MYD' (Errcode: 9) snip mysql error: Can't find file: './bsdforums/administrator.frm' (errno: 9) May be a simple search will help you. http://www.google.com/search?hl=enq=mysql+openfiles+openbsdbtnG=Google+Search http://marc.theaimsgroup.com/?l=openbsd-miscw=2r=1s=mysql+%2Berrcode+9q=b Daniel
Re: PHP or Mysql problem?
Hi Kiraly, mysql error: Can't create/write to file '/tmp/ #sql_4c99_0.MYD' (Errcode: 9) MySQL problem. Simple suggestions, not idiot-proof: /etc/my.cnf: [mysqld_safe] open-files = 1024 Up kern.maxfiles, if needed. `sysctl -w kern.maxfiles=17720`, for instance. Modify /etc/sysctl.conf to make changes permanent. /etc/login.conf changes: daemon:\ :ignorenologin:\ :datasize=infinity:\ :maxproc=infinity:\ :openfiles-cur=1024:\ --- check this one :stacksize-cur=8M:\ :localcipher=blowfish,8:\ :tc=default: and/or: default:\ :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/ bin:\ :umask=022:\ :datasize-max=512M:\ --- check this one :datasize-cur=256M:\ --- check this one :maxproc-max=128:\ :maxproc-cur=64:\ :openfiles-cur=1024:\ --- check this one :stacksize-cur=4M:\ :localcipher=blowfish,6:\ :ypcipher=old:\ :tc=auth-defaults:\ :tc=auth-ftp-defaults: Whatever suits your need. A reboot will make mysql run in class daemon, if you start mysql with `sudo mysqld_safe `, you'll most probably be in class default. That's why I upped both. If I am wrong, somebody will kick me in the nuts, so do check back here. ;-) I've had problems with both open files and memory limits. Those problems are gone now. HTH... Nico
Re: PHP or Mysql problem?
Nico Meijer wrote: Hi Kiraly, mysql error: Can't create/write to file '/tmp/ #sql_4c99_0.MYD' (Errcode: 9) MySQL problem. Simple suggestions, not idiot-proof: /etc/my.cnf: Mmm..installing mysqlserver usually doesn't create /etc/my.cfn...isn't it? I can't find that file but I'm running mysqld...
Re: PHP or Mysql problem?
On Wed, 2005-06-15 at 11:30 +0200, Nico Meijer wrote: Hi Kiraly, mysql error: Can't create/write to file '/tmp/ #sql_4c99_0.MYD' (Errcode: 9) MySQL problem. Simple suggestions, not idiot-proof: I prefer this on OpenBSD 3.6 (should be same on 3.7): Add to /etc/login.conf: # # for mysql to work right # mysql:\ :datasize=infinity:\ :maxproc=infinity:\ :openfiles-cur=2048:\ :openfiles-max=8192:\ :stacksize-cur=8M:\ :localcipher=blowfish,8:\ :tc=default: sudo vipw and change the login class for _mysql to 'mysql'. To use this class, you MUST use 'sudo -c mysql -u _mysql', like this (can be put in /etc/rc.local): sudo -c mysql -u _mysql /usr/local/sbin/mysql.server start This may be useful as well (can also put in /etc/sysctl.conf): sudo sysctl -w kern.maxfiles=16384 And finally, add to /etc/my.cnf on (OpenBSD 3.6 with mysql 4.0.20): [mysqld] ... open-files=1000 ... Jamie Strandboge