How to slim MySQL?
Hi folks, I'd like to install MySQL on an embedded system. It's a powerful x86-based computer with the only limitation of having a small-size flash ROM as its secondary storage. I tried installing MySQL from source which resulted in occupying 140 MB of disk space, while the maximum amount of flash memory I'm permitted to use is about 20-30 MB. So I'm wondering how to go about slimming MySQL down to the bare minimum. Following is the list of directories at the root of the installation directory: * bin/ * include/ * lib/ * libexec/ * mysql-test/ * share/ * sql-bench/ I think removing the 'include', 'mysql-test' and 'sql-bench' directories may be a good start, but I'm still far away from having a tiny little mysql! BTW, I tried MySQL Embedded, but it seems that it doesn't meet our needs. Any help would be highly appreciated :) *-- Nima Mohammadi*
Re: Why is Host option Failing?
On Monday, July 05, 2010 08:26:03 am you wrote: Hi, dig should be in /usr/bin but its possible it isn't installed I'm not sure about PcLinuxOS but it's in the dnsutils package on debian/Ubuntu. As you said earlier, it's not necessary to use dig to check the ip address. Ping does the job. Also, after you change DB/User permissions with GRANT statements it's often necessary to do a 'FLUSH PRIVILEGES;' This I didn't know.. I just tried it, though, and it makes no difference. It's also entirely possible that Photon resolves to 127.0.0.1 in which case you will need GRANT for 'michael'@'localhost' Is the name pho [mich...@photon ~]$ ping photon PING photon (192.168.1.20) 56(84) bytes of data. 64 bytes from photon (192.168.1.20): icmp_seq=1 ttl=64 time=0.047 ms 64 bytes from photon (192.168.1.20): icmp_seq=2 ttl=64 time=0.045 ms ton listed in /etc/hosts ? Hope thats of some use mc On 5 July 2010 03:35, Michael Satterwhite mich...@weblore.com wrote: On Sunday, July 04, 2010 06:36:00 pm you wrote: What user are you at the time you are running these tests. Would I be correct in guessing 'root'? The reason localhost works is because, in some distros, root is enabled localhost with no password .. which is dangerous enough.. granting root@'% would be an invitation to disaster.. From that same command line, what do you get for $ dig photon You likely want to make a grant suitable rfor that network address for the user you are trying to use. - michael dykman This sounded good, but dig photon returns command not found I logged onto the server as root and issued the command: grant all privileges on *.* to 'michael'@'%' identified by ; (??? is the password, in quotes, of course). It responded Query OK, 0 rows affected (0.00 sec) I still can't connect via mysql -h photon -u michael -p?? Still ERROR 2003 (HY000): Can't connect to MySQL server on 'photon' (111) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=clark...@gmail.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Why is Host option Failing?
On Jul 5, 2010, at 10:04 AM, Michael Satterwhite wrote: [...snip...] On 5 July 2010 03:35, Michael Satterwhite mich...@weblore.com wrote: On Sunday, July 04, 2010 06:36:00 pm you wrote: [...snip...] I still can't connect via mysql -h photon -u michael -p?? On my home computer I entered the following (note there is no space between the -p and the password): $ mysql -h www.my_abc_xyz.com -u myUserNm -pMyPasswrd The remote computer let me into mysql and I typed: mysql use mysql mysql select host, user, Password, Select_priv from user; +--+--+---+-+ | host | user | Password | Select_priv | +--+--+---+-+ | localhost| myUserNm | *ABC8C800D9A264876A32F5175DE21C1A0B89XYZ | Y | | %| myUserNm | *ABC8C800D9A264876A32F5175DE21C1A0B89XYZ | Y | +--+--+---+-+ Your results should be similar. HTH, Bob
Re: How to slim MySQL?
On Mon, Jul 5, 2010 at 7:59 AM, Nima nima@gmail.com wrote: Hi folks, I'd like to install MySQL on an embedded system. It's a powerful x86-based computer with the only limitation of having a small-size flash ROM as its secondary storage. I tried installing MySQL from source which resulted in occupying 140 MB of disk space, while the maximum amount of flash memory I'm permitted to use is about 20-30 MB. So I'm wondering how to go about slimming MySQL down to the bare minimum. Following is the list of directories at the root of the installation directory: * bin/ * include/ * lib/ * libexec/ * mysql-test/ * share/ * sql-bench/ I think removing the 'include', 'mysql-test' and 'sql-bench' directories may be a good start, but I'm still far away from having a tiny little mysql! BTW, I tried MySQL Embedded, but it seems that it doesn't meet our needs. Any help would be highly appreciated :) *-- Nima Mohammadi* Have you considered SQLite? You probably want to compile your own version of MySQL. You probably want to remove debugging symbols* (which have been present since the mid 5.0 series, iirc), and any engines/character sets/etc you don't need. *Alternatively you can run the strip command. -- Rob Wultsch wult...@gmail.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Got error 139 from storage engine (InnoDB)
On Sun, Jul 4, 2010 at 8:35 PM, James Corteciano ja...@linux-source.org wrote: Hi All, I have received error message ERROR 1030 (HY000) at line 167: Got error 139 from storage engine when importing dump database to MySQL server. The MySQL server is using InnoDB. I have google it and it's something problem on exceeding a row-length limit in the InnoDB table. Any have idea how to fix this? Thanks. Regards, James I can not recall having seen that error before. I did a slight amount of googling and it sounds like it might be a innodb tuning issue. Please post: 1. Any relevant entries in your error log file. 2. Your my.cnf. 3. You servers specs and whether the server also runs other daemons. -- Rob Wultsch wult...@gmail.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Why is Host option Failing?
On Monday, July 05, 2010 10:46:48 am Bob Cole wrote: The remote computer let me into mysql and I typed: mysql use mysql mysql select host, user, Password, Select_priv from user; +--+--+---+ -+ | host | user | Password | | Select_priv | +--+--+---+ -+ | localhost| myUserNm | *ABC8C800D9A264876A32F5175DE21C1A0B89XYZ | | Y | %| myUserNm | | *ABC8C800D9A264876A32F5175DE21C1A0B89XYZ | Y | +--+--+---+ -+ Your results should be similar. HTH, Bob Bob, I thought you'd identified the problem, but I don't think it is. Here's my output +---+--+---+ | host | user | password | +---+--+---+ | localhost | root | *135A6626293E0699534358EE0AB1230BF69067A5 | | PHOTON| root | *135A6626293E0699534358EE0AB1230BF69067A5 | | 127.0.0.1 | root | *135A6626293E0699534358EE0AB1230BF69067A5 | | localhost | debian-sys-maint | *2BA4FF2E2728588CB18B3A06924A8C37B5467F11 | | localhost | michael | *101CC8AAEAEBFDC7571307AD2B51F34D95B80572 | | localhost | webcalendar | *135A6626293E0699534358EE0AB1230BF69067A5 | | photon| michael | *101CC8AAEAEBFDC7571307AD2B51F34D95B80572 | | % | michael | *101CC8AAEAEBFDC7571307AD2B51F34D95B80572 | +---+--+---+ I'm sure you know more than I do, but it looks good to me. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: How to slim MySQL?
On Mon, Jul 5, 2010 at 8:26 PM, Rob Wultsch wult...@gmail.com wrote: Have you considered SQLite? You probably want to compile your own version of MySQL. You probably want to remove debugging symbols* (which have been present since the mid 5.0 series, iirc), and any engines/character sets/etc you don't need. *Alternatively you can run the strip command. -- Rob Wultsch wult...@gmail.com Well, I'm not in charge of deciding which RDBMS to use and the MySQL is needed for a program which has already been written. So it seems that we have no choice but to stick with MySQL. I guess for removing debug symbols I need to add the --without-debug option to the ./configure command. I think using these options would also be helpful: - --without-man - --without-docs - --without-ipv6 - --disable-largefile I'm not sure which engine we're going to use, so I'll have to defer this to another time. Is there any other work I could do to strip MySQL? *-- Nima Mohammadi*
Re: How to slim MySQL?
On Mon, Jul 5, 2010 at 10:07 AM, Nima Mohammadi nima@gmail.com wrote: On Mon, Jul 5, 2010 at 8:26 PM, Rob Wultsch wult...@gmail.com wrote: Have you considered SQLite? You probably want to compile your own version of MySQL. You probably want to remove debugging symbols* (which have been present since the mid 5.0 series, iirc), and any engines/character sets/etc you don't need. *Alternatively you can run the strip command. -- Rob Wultsch wult...@gmail.com Well, I'm not in charge of deciding which RDBMS to use and the MySQL is needed for a program which has already been written. So it seems that we have no choice but to stick with MySQL. I guess for removing debug symbols I need to add the --without-debug option to the ./configure command. I think using these options would also be helpful: - --without-man - --without-docs - --without-ipv6 - --disable-largefile I'm not sure which engine we're going to use, so I'll have to defer this to another time. Is there any other work I could do to strip MySQL? *-- Nima Mohammadi* This is not a topic I have worked with previously. I image this may be a good topic to bring to a consulting company (specifically Percona and Open Query might work well) if you are unable to meet your size goals. -- Rob Wultsch wult...@gmail.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Got error 139 from storage engine (InnoDB)
I think this is related to foreign key constraint data types don't match up... so verify your CREATE TABLE structure or post the CREATE TABLE statement for your table. Or there is chance of data type size and the value you are inserting.. such type of problem occurs if the data import ie source and restore ie target are of different versions . Thanks, On Mon, Jul 5, 2010 at 9:36 PM, Rob Wultsch wult...@gmail.com wrote: On Sun, Jul 4, 2010 at 8:35 PM, James Corteciano ja...@linux-source.org wrote: Hi All, I have received error message ERROR 1030 (HY000) at line 167: Got error 139 from storage engine when importing dump database to MySQL server. The MySQL server is using InnoDB. I have google it and it's something problem on exceeding a row-length limit in the InnoDB table. Any have idea how to fix this? Thanks. Regards, James I can not recall having seen that error before. I did a slight amount of googling and it sounds like it might be a innodb tuning issue. Please post: 1. Any relevant entries in your error log file. 2. Your my.cnf. 3. You servers specs and whether the server also runs other daemons. -- Rob Wultsch wult...@gmail.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=aim.prab...@gmail.com -- Best Regards, Prabhat Kumar MySQL DBA Datavail-India Mumbai Mobile : 91-9987681929 www.datavail.com My Blog: http://adminlinux.blogspot.com My LinkedIn: http://www.linkedin.com/in/profileprabhat
Re: How to slim MySQL?
On Mon, Jul 5, 2010 at 10:11 PM, Rob Wultsch wult...@gmail.com wrote: This is not a topic I have worked with previously. I image this may be a good topic to bring to a consulting company (specifically Percona and Open Query might work well) if you are unable to meet your size goals. -- Rob Wultsch wult...@gmail.com As a low budget, semi-student project, I don't see that as an option! *-- Nima Mohammadi*
Re: Why is Host option Failing?
Michael: It could be that MySQL is only listening on localhost (127.0.0.1) and not your net IP. Check your network settings in your server config. Alternately, you can also do a netstat -anp | grep mysql As root and see where it is listening. Regards, -- Burhan Khalid Sent from my BlackBerry® smartphone from Wataniya Telecom -Original Message- From: Michael Satterwhite mich...@weblore.com Date: Mon, 5 Jul 2010 10:04:22 To: Martin Clarkeclark...@gmail.com Cc: mysql@lists.mysql.com Subject: Re: Why is Host option Failing? On Monday, July 05, 2010 08:26:03 am you wrote: Hi, dig should be in /usr/bin but its possible it isn't installed I'm not sure about PcLinuxOS but it's in the dnsutils package on debian/Ubuntu. As you said earlier, it's not necessary to use dig to check the ip address. Ping does the job. Also, after you change DB/User permissions with GRANT statements it's often necessary to do a 'FLUSH PRIVILEGES;' This I didn't know.. I just tried it, though, and it makes no difference. It's also entirely possible that Photon resolves to 127.0.0.1 in which case you will need GRANT for 'michael'@'localhost' Is the name pho [mich...@photon ~]$ ping photon PING photon (192.168.1.20) 56(84) bytes of data. 64 bytes from photon (192.168.1.20): icmp_seq=1 ttl=64 time=0.047 ms 64 bytes from photon (192.168.1.20): icmp_seq=2 ttl=64 time=0.045 ms ton listed in /etc/hosts ? Hope thats of some use mc On 5 July 2010 03:35, Michael Satterwhite mich...@weblore.com wrote: On Sunday, July 04, 2010 06:36:00 pm you wrote: What user are you at the time you are running these tests. Would I be correct in guessing 'root'? The reason localhost works is because, in some distros, root is enabled localhost with no password .. which is dangerous enough.. granting root@'% would be an invitation to disaster.. From that same command line, what do you get for $ dig photon You likely want to make a grant suitable rfor that network address for the user you are trying to use. - michael dykman This sounded good, but dig photon returns command not found I logged onto the server as root and issued the command: grant all privileges on *.* to 'michael'@'%' identified by ; (??? is the password, in quotes, of course). It responded Query OK, 0 rows affected (0.00 sec) I still can't connect via mysql -h photon -u michael -p?? Still ERROR 2003 (HY000): Can't connect to MySQL server on 'photon' (111) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=clark...@gmail.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=burhan.kha...@gmail.com
Re: Why is Host option Failing? *SOLVED*
On Monday, July 05, 2010 01:17:57 pm burhan.kha...@gmail.com wrote: Michael: It could be that MySQL is only listening on localhost (127.0.0.1) and not your net IP. Check your network settings in your server config. Alternately, you can also do a netstat -anp | grep mysql As root and see where it is listening. Regards, -- Burhan Khalid Thanks much. This led me to find the problem in the server config. The bind- address parameter was incorrect. I appreciate the help everyone gave me. Thank you. ---Michael -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Got error 139 from storage engine (InnoDB)
On Mon, Jul 5, 2010 at 9:06 AM, Rob Wultsch wult...@gmail.com wrote: On Sun, Jul 4, 2010 at 8:35 PM, James Corteciano ja...@linux-source.org wrote: Hi All, I have received error message ERROR 1030 (HY000) at line 167: Got error 139 from storage engine when importing dump database to MySQL server. The MySQL server is using InnoDB. I have google it and it's something problem on exceeding a row-length limit in the InnoDB table. Any have idea how to fix this? Thanks. Regards, James I can not recall having seen that error before. I did a slight amount of googling and it sounds like it might be a innodb tuning issue. Please post: 1. Any relevant entries in your error log file. 2. Your my.cnf. 3. You servers specs and whether the server also runs other daemons. -- Rob Wultsch wult...@gmail.com It would also be helpful for you to run the import with the verbose flag. Then we would have a better understanding of exactly what statement was causing the error. -- Rob Wultsch wult...@gmail.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: How to slim MySQL?
As you are building from source, whats pre-compile configuration options are you using? That will have everything to do with the size of your resulting binaries. - michael dykman On Mon, Jul 5, 2010 at 1:53 PM, Nima Mohammadi nima@gmail.com wrote: On Mon, Jul 5, 2010 at 10:11 PM, Rob Wultsch wult...@gmail.com wrote: This is not a topic I have worked with previously. I image this may be a good topic to bring to a consulting company (specifically Percona and Open Query might work well) if you are unable to meet your size goals. -- Rob Wultsch wult...@gmail.com As a low budget, semi-student project, I don't see that as an option! *-- Nima Mohammadi* -- - michael dykman - mdyk...@gmail.com May the Source be with you. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: How to slim MySQL?
Go through that list of options and exclude anything you don't want or need. It is a very long list. - md On Mon, Jul 5, 2010 at 4:39 PM, Nima Mohammadi nima@gmail.com wrote: On Tue, Jul 6, 2010 at 12:54 AM, Michael Dykman mdyk...@gmail.com wrote: As you are building from source, whats pre-compile configuration options are you using? That will have everything to do with the size of your resulting binaries. - michael dykman ./configure --prefix=/home/nima/mysql/ --without-docs --without-debug --without-man --disable-ipv6 --disable-largefile -- Nima Mohammadi -- - michael dykman - mdyk...@gmail.com May the Source be with you. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
re: Connection Diagnostic Tool
I have been trying to figure this one out, but I don't have the skill sets here so I can use some help. I tried ' -h 127.0.0.1' in my bash shell and I get a command not found, so I am still really off-the-mark. Is there a place on the net I can look up what it does and how to run it? Thanks! - Original Message - From: Michael Dykman mdyk...@gmail.com To: michel compu...@videotron.ca Sent: Saturday, July 03, 2010 11:37 PM Subject: Re: Connection Diagnostic Tool You are right.. Java never coonnects on that domain socket, it *always* used TCP. Check your credentials at the command line using -h 127.0.0.1 (or even the LAN ip, depending on how your JDBC connections are configured) which will force your client to connect via TCP, just as Java will. I expect that you will find that there are permission errors preventing the TCP connec which are not obvious when connecting via the domain socket. - michael On Sat, Jul 3, 2010 at 11:14 PM, michel compu...@videotron.ca wrote: Michael, I am able to connect using the socket, so MySQL is working fine. The problem is when 'SoftSlate Commerce' tries to connect as localhost. From what I have been reading I am using the 'mysql.sock', but it's not at the default '/tmp/mysql.sock', it's created in /home/sgdev/mysql; so it may bew that I need a way to specify to 'SoftSlate Commerce' where the socket is. Regards, Michel - Original Message - From: Michael Dykman mdyk...@gmail.com To: michel compu...@videotron.ca Cc: mysql@lists.mysql.com Sent: Saturday, July 03, 2010 2:43 PM Subject: Re: Connection Diagnostic Tool I use c3p0 to manage MySQL connections in my JVM stack and have for years in many installations, I have never had to do anything special. If I can connect to the server through the console at the command line of the client machine using the same credentials, then the stack will just work. Are you using Tomcat's JNDI config? I have always found those to be a pain.. I manage my DataSource via Spring which I find to be much more portable. At the end of the day, if you are able to connect manually as described above but your Tomcat application cannot, it's is not a MySQL problem.. It's more likely a Tomcat/JNDI problem. If you can't connect via the command line (same client, same host, same credentials), then we have a MySQL issue we can address as such. - michael dykman On Sat, Jul 3, 2010 at 8:08 AM, michel compu...@videotron.ca wrote: I am setting up the Softslate web store package that uses Hibernate to connect to MySQL. Softslate fails to connect to MysQL on the c3p0 connection pooling. While I would love to solve this little problem it would be wiser if I learn to diagnose the problem. Is there a tool that can run on the Tomcat server that can help me replicate/diagnose the problem? Softslaste is running on the same box as MySQL. Thank you! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=mdyk...@gmail.com -- - michael dykman - mdyk...@gmail.com May the Source be with you. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=compu...@videotron.ca -- - michael dykman - mdyk...@gmail.com May the Source be with you. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Connection Diagnostic Tool
On Mon, Jul 5, 2010 at 3:55 PM, michel compu...@videotron.ca wrote: I have been trying to figure this one out, but I don't have the skill sets here so I can use some help. I tried ' -h 127.0.0.1' in my bash shell and I get a command not found, so I am still really off-the-mark. Is there a place on the net I can look up what it does and how to run it? Thanks! I am pretty sure Michael that meant running the command line mysql client: mysql -uuser -ppass -h127.0.0.1 -e 'select hello world!' -- Rob Wultsch wult...@gmail.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org