Switching... » MySQL http://switch.richard5.net How to build your Mac into a internet server using open source software Mon, 25 May 2009 14:13:02 +0000 en hourly 1 http://wordpress.org/?v=3.2.1 MySQL shared library issue might get solved in coming release http://switch.richard5.net/2007/05/06/mysql-shared-library-issue-might-get-solved-in-coming-release/ http://switch.richard5.net/2007/05/06/mysql-shared-library-issue-might-get-solved-in-coming-release/#comments Sun, 06 May 2007 20:05:50 +0000 Richard5 http://switch.richard5.net/2007/05/06/mysql-shared-library-issue-might-get-solved-in-coming-release/ There is a light at the end of the tunnel, after complaining and blogging about the issue for some time it looks like it is going to be solved in the next release of MySQL. I received some updates on the bug report via email and it is released in version 5.0.40 Enterprise version, see the release notes. Now we only need to wait for the Community release….

]]>
http://switch.richard5.net/2007/05/06/mysql-shared-library-issue-might-get-solved-in-coming-release/feed/ 0
MySQL updated to version 5.0.33 http://switch.richard5.net/2007/01/29/mysql-updated-to-version-5033/ http://switch.richard5.net/2007/01/29/mysql-updated-to-version-5033/#comments Mon, 29 Jan 2007 20:27:32 +0000 Richard5 http://switch.richard5.net/2007/01/29/mysql-updated-to-version-5033/ MySQL has released a new version of the Community Server 5.0.33. This is a source-only release, which means that MySQL.com will not provide binary builds. You can read all about the new/changed functionality and bugfixes in the release notes. You can download the latest source version from the MySQL.com site.

Because of the new Community release policy, there will be source only releases between the full (binary) releases. I was unable to find out what the reason for it was or when a version qualifies for a binary release.

You can download the binary install of a previous version and do the source compile/install to get a functional 5.0.33 version running with all the goodies and defaults from the binary install (like a startupitem and preference pane).

]]>
http://switch.richard5.net/2007/01/29/mysql-updated-to-version-5033/feed/ 0
MySQL updated to version 5.0.27 http://switch.richard5.net/2006/10/29/mysql-updated-to-version-5027/ http://switch.richard5.net/2006/10/29/mysql-updated-to-version-5027/#comments Sun, 29 Oct 2006 10:24:35 +0000 Richard5 http://switch.richard5.net/2006/10/29/mysql-updated-to-version-5027/ MySQL Community Server has been updated to a new release which is mostly a bugfix release for an ABI incompatibility with earlier releases. This bug hasn’t affected me and it doesn’t really have to affect you if you don’t use this functionality, check the bug report to make sure that this is the case.

Please not that if you run the binary installer it’s still necessary to compile the source afterwards because the shared library bug isn’t solved yet. Also don’t forget to copy the data directory to the new version of MySQL or it might look like you lost all your databases.

Please note that MySQL has created a fork for the distribution. The paying customers get MySQL Enterprise Server which has been updated to 5.0.28 (don’t know why there is the difference in versions). To read more about the differentiation between the MySQL Enterprise Server and the MySQL Community Server, read Kaj Arnö’s blog.

As an added bonus I would like to point out that if you are still using the mysql extensions instead of the mysqli extensions (i stands for improved) you should take a look at the MySQL wiki article which will help you convert your application to the new module. They even got a script which will convert your source for you. If you still need convincing why you should convert please read this old article on the Zend site.

]]>
http://switch.richard5.net/2006/10/29/mysql-updated-to-version-5027/feed/ 0
MySQL updated to version 5.0.26 http://switch.richard5.net/2006/10/10/mysql-updated-to-version-5026/ http://switch.richard5.net/2006/10/10/mysql-updated-to-version-5026/#comments Tue, 10 Oct 2006 20:26:49 +0000 Richard5 http://switch.richard5.net/2006/10/10/mysql-updated-to-version-5026/ MySQL logoJust installed MySQL 5.0.26 on my new Intel Mac mini after I just installed version 5.0.24a on it to create a new Intel based test environment. It was a good exercise to see if the update of the packages works as advertised. The binary installation package, which I installed first, creates a new symlinked directory and leaves the previous version intact. After that I still needed to compile from source as the shared library issue isn’t solved and I think it won’t be solved for some time as I found some info that the error is still there in the beta of version 5.1.

As you might notice MySQL skipped another release version, again, version 5.0.25 was only released to paying customers. Go figure… The announcement solved so many bugs they used two emails on the announcement mailinglist ! Here is the first and the second.

I must say the Intel mini is a dream to use, compilation is much, much faster. I also found out that I really need the memory upgrade as I can’t run to many applications at the same time as the memory swapping onto the slow hard-drive is really killing all performance benefits. The GUI sometimes responds much slower than on a G4 with 1Gb of memory.

]]>
http://switch.richard5.net/2006/10/10/mysql-updated-to-version-5026/feed/ 0
Upgraded my own server to MySQL 5.0.24a http://switch.richard5.net/2006/09/11/upgraded-my-own-server-to-mysql-5024a/ http://switch.richard5.net/2006/09/11/upgraded-my-own-server-to-mysql-5024a/#comments Mon, 11 Sep 2006 19:35:24 +0000 Richard5 http://switch.richard5.net/2006/09/11/upgraded-my-own-server-to-mysql-5024a/ My server was, and still is partially, running the v1 version of the documentation which means that MySQL, Apache and PHP where still the old versions provided by Server Logistics. The MySQL server was still running version 4.0.21 which is ancient and needed an upgrade. But it is a tricky task to perform. Upgrading software on my development server is easy and if it doesn’t work there is no big problem. Upgrading my live server is another thing. Besides my own sites I host some other sites for friends and although none of the sites can’t afford downtime it’s not something I was looking forward to.

So I needed to be prepared. I made a copy of my production servers harddisk to an external drive and used that image to boot my test mini. In this manner I had an exact copy of my live server on my internal network. In this manner I could play around without damaging anything.

The procedure I ended up with has caused a short downtime but you can’t do without as you need to shutdown the old server and start the new. It means several seconds of downtime which shouldn’t be much of a problem. I think nobody really noticed that my site was down for some seconds.

Here is how I did it:

  • Download the appropriate binary package for your Mac and the source code from MySQL.com
  • Use the binary installer and install MySQL 5.0.24a
  • Use my documentation to install the source code package. This is required to get the required shared libraries to compile other programs which need them.
  • Delete the MySQL startup item from /Library/StartupItems using the command sudo rm -rf /Library/StartupItems/MySQL
  • Delete the Server Logistics MySQL preference pane from /System/Library/PreferencePane using the command sudo rm -rf /System/Library/PreferencePane/MySQL.prefPane
  • Install the MySQL startup item from the binary installation package
  • Install the MySQL Preference pane from the binary installation package by double clicking on it.
  • Copy the fresh MySQL data directory for safekeeping using the command sudo mv /usr/local/mysql/data /usr/local/mysql/data.org
  • Copy the databases from the old server to the new by using the command: sudo cp -R /Library/MySQL/var /usr/local/mysql/data
  • Change the ownership of the data directory to set the correct permissions by using the command: sudo chown -R mysql /usr/local/mysql/data
  • Shutdown the old MySQL server, this can be done using the Preference Pane or issue the command mysqladmin shutdown -p followed by your MySQL password
  • Start the new server by issuing the command: sudo /usr/local/mysql/bin/mysqld_safe &. It should respond with: Starting mysqld daemon with databases from /usr/local/mysql/data
  • Next fix some issues with the MySQL passwords which have changed since version 4.1. You can do this by running the command: sudo /usr/local/mysql/bin/mysql_fix_privilege_tables --password=yourpassword
  • That’s it, you are running MySQL 5.0.24a. Congratulations.

Note: Depending on the speed at which information is inserted or updated in your database you can choose to bring down the old version of the database before copying it. This would mean that your site is down for a longer period but would guarantee that all the information is copied. I’ve chosen to copy the data first as my information isn’t updated that frequently.

Next I’m going to recompile all the mailserver components to use the new MySQL libraries. They all still work but you can better be safe than sorry. After that I’m going to upgrade Apache and PHP.

]]>
http://switch.richard5.net/2006/09/11/upgraded-my-own-server-to-mysql-5024a/feed/ 1
Finished installation instructions on MySQL, Apache and PHP http://switch.richard5.net/2006/08/13/finished-installation-instructions-on-mysql-apache-and-php/ http://switch.richard5.net/2006/08/13/finished-installation-instructions-on-mysql-apache-and-php/#comments Sun, 13 Aug 2006 20:13:53 +0000 Richard5 http://switch.richard5.net/2006/08/13/finished-installation-instructions-on-mysql-apache-and-php/ This as taken me much, much longer than I ever planned it to take. First there was the introduction of the Intel based Mac’s that I needed to comprehend. Secondly the many problems I’d encountered with the shared library support in the MySQL as many of you have read in previous posts. Third there was the happy occasion of the birth of my daughter which prevented me from spending much time behind the screen.

But it’s done, I’ve finally finished the instruction for installing (and compiling) MySQL 5, Apache 2 and PHP 5. Hope you are able to use them well.

I’m currently working on the instructions for the mailserver as there are some tweaks needed to get that working with the current setup. There where some issues with Intel based Macs and SSL support but I’ve got that solved. Hope to get that finished in a very short time… (not naming dates here, getting careful… ;-) )

]]>
http://switch.richard5.net/2006/08/13/finished-installation-instructions-on-mysql-apache-and-php/feed/ 1
MySQL 5.0.24 has been released http://switch.richard5.net/2006/08/05/mysql-5024-has-been-released/ http://switch.richard5.net/2006/08/05/mysql-5024-has-been-released/#comments Sat, 05 Aug 2006 20:43:54 +0000 Richard5 http://switch.richard5.net/2006/08/05/mysql-5024-has-been-released/ Just got an email in my inbox from the MySQL announce mailinglist that MySQL 5.0.24 just has been released. Version 5.0.23 was skipped for release, don’t know why but it means that more has been solved. One thing I do know is that they still haven’t solved our issue with the shared libraries.

All the issues that have been solved can be found in the announcement email that was sent out.

I’m finishing up a short term solution so we can use MySQL with shared libraries without too much of a hassle, for Intel and PowerPC Mac’s (it will involve a little compiling). Keep watching this channel for more info later on…

]]>
http://switch.richard5.net/2006/08/05/mysql-5024-has-been-released/feed/ 0
Got the MySQL shared library problem solved http://switch.richard5.net/2006/06/28/got-the-mysql-shared-library-problem-solved/ http://switch.richard5.net/2006/06/28/got-the-mysql-shared-library-problem-solved/#comments Wed, 28 Jun 2006 19:22:42 +0000 Richard5 http://switch.richard5.net/2006/06/28/got-the-mysql-shared-library-problem-solved/ I’ve been tinkering for quite some time now but I think I’ve got the problem solved with the issues that I blogged about earlier because MySQL didn’t provide shared libraries with their binary installation.

The solution is to compile your own shared libraries and remove the ones that come with the binary distribution. It took so long to solve this issue because I had to compile and test all the components that we use for our setup. One time PHP worked but Courier-Auth didn’t and when I got Courier-Auth to compile, PHP got problems again and the same happened with Postfix. But now I’ve had all programs that need the MySQL libraries like PHP, Courier-Auth and Postfix to compile and run without a hitch.

I will provide instructions on how to compile these and how to install the new shared libraries. I’m also thinking of providing you with the finished product, the compiled shared libraries as a downloadable file which you only need to unpack and copy to get everything running, because compiling MySQL is something that will take a while on a G4 Mac mini.

I still need to test this on the Intel platform, I have access to someone else’s Mac mini which I can use but it will take some time and I need to write it all down in a nice and easy to read manner for you to use. So give me some time to finish this and I’ll update the documentation as soon as possible. Keep watching this space…

Please note that I hope this solution will be a workaround for the time being. Maybe you can help to push MySQL to provide shared libraries in the binary install package by adding your voice to the bug report in at the MySQL site. Add your voice by commenting.

]]>
http://switch.richard5.net/2006/06/28/got-the-mysql-shared-library-problem-solved/feed/ 0
MySQL has been updated to 5.0.22 to solve security issues http://switch.richard5.net/2006/06/01/mysql-has-been-updated-to-5022-to-solve-security-issues/ http://switch.richard5.net/2006/06/01/mysql-has-been-updated-to-5022-to-solve-security-issues/#comments Thu, 01 Jun 2006 06:13:59 +0000 Richard5 http://switch.richard5.net/2006/06/01/mysql-has-been-updated-to-5022-to-solve-security-issues/ MySQL logoI received an email yesterday on the MySQL announce list which told me about a new update on MySQL. This time the release was to solve a security hole that recently was discovered. It seems it was possible to inject SQL statements that you didn’t want to happen.

      Security fix: An SQL-injection security hole has been found in
      multibyte encoding processing. The bug was in the server,
      incorrectly parsing the string escaped with mysql_real_escape().

      This vulnerability was discovered and reported by Josh Berkus
      and Tom Lane as part of the inter-project security collaboration
      of the OSDB consortium.

You can read more about the issue in the release statement.

Unfortunately our issue for Mac OS X users hasn’t been solved yet. We still don’t get shared binaries in this release. I’m working on a solution with Jeff Stubbs to provide the shared libraries. We really need those shared libraries to be able to compile your own postfix server with support for MySQL and SSL/TLS. This currently isn’t possible because MySQL provides us with static libraries which have been compiled with SSL support as well, as told before. So during the linking phase you end up with multiple definitions of symbols which don’t help. We are nearing a good solution so keep watching this space for more info.

Maybe you can help to push MySQL to provide shared libraries in the binary install package by adding your voice to the bug report in at the MySQL site. Add your voice by commenting. This is as far as I know the best way to let them know we think this is an important feature.

]]>
http://switch.richard5.net/2006/06/01/mysql-has-been-updated-to-5022-to-solve-security-issues/feed/ 0
MySQL 5.0.x binary package has no shared library support http://switch.richard5.net/2006/05/20/mysql-50x-binary-package-has-no-shared-library-support/ http://switch.richard5.net/2006/05/20/mysql-50x-binary-package-has-no-shared-library-support/#comments Sat, 20 May 2006 18:58:48 +0000 Richard5 http://switch.richard5.net/2006/05/20/mysql-50x-binary-package-has-no-shared-library-support/ After spending more time helping Andy Vestergård to get everything working on his new Intel Mac mini we ran into problems compiling Postfix with MySQL support together with TLS/SSL support. In the linking phase of compiling Postfix we got many errors warning us about multiple definitions of symbols being used like:

/usr/bin/ld: multiple definitions of symbol _SSL_CTX_set_timeout
/usr/lib/libssl.0.9.7.dylib(ssl_sess.o) definition of _SSL_CTX_set_timeout
/usr/local/mysql/lib/libmysqlclient.a(ssl.o) definition of _SSL_CTX_set_timeout in section (__TEXT,__text)

It took me quite some time to locate the origin of this problem and ‘m sad to say that the cause lies with MySQL. In the lib directory of the MySQL installation there are no more shared libraries only static ones. There is even a bug being reported about this problem back in 2005 and it still isn’t solved. The remark being put there is to compile it yourself if you need it. I looked at the 5.0.x packages they provided both for PPC and Intel and the error is still there.

I guess this means I have to write documentation on how to compile your own binary of MySQL. This will delay the v2 documentation for some time…

]]>
http://switch.richard5.net/2006/05/20/mysql-50x-binary-package-has-no-shared-library-support/feed/ 2