Entries in the ' mysql ' category

Written May 27, 2008 in centos, howto, linux, mysql, sysadmin

What a mouthful. Like most other americans who live on a budget, I’m taking a “staycation” this weekend. What better thing to do than to get my mail server migrated to my new VPS? Well, first, I suppose, I should get the mail server all working on the new VPS…

In CentOS, the default Postfix package doesn’t have MySQL support built in. If you’ve got the priorities plugin installed, you’re either going to need to disable it or otherwise work around it so that you get the one from the centosplus repo. Other than that, it’s been made about as easy as it can be… just keep in mind as you’re reading this tutorial that I really loathe administering mail servers and consider it to be a quite onerous chore that’s been made even more onerous by spammers and hackers and script kiddies and what have you.

You’ll need to install: yum install gcc postfix clamav mysql-server mysql-devel spamassassin
dovecot php php-mbstring php-mysql rpm-build. There’s no RPM for Postfixadmin, but it’s available from the project’s site on Sourceforge.

And now the fun begins. This howto assumes that you have a decent level of knowledge and skill setting up services that run on Linux.

Continue Reading »

Written May 27, 2008 in mysql, sysadmin

Been doing a lot of work with MySQL Replication recently. We’re exploring a solution for our needs, which are mostly HA issues. Maatkit has a bunch of scripts that make replication easier to troubleshoot or fix, or make loading large datasets easier, or … well, go read the …

Continue Reading »

Written May 12, 2008 in mysql, opensuse

There aren’t any binaries for MySQL Carrier Grade Edition, which includes the NDB Cluster engine, enabling highly available MySQL services. If you’re using OpenSUSE, you can get an older edition (MySQL 5.1.24) from the Build Service … or the most recent Carrier Grade Edition, 6.2 and 6.3, from the MySQL …

Continue Reading »

Today, let’s take a look at Zend_Db. Zend_Db implements a Table Data Gateway, in which the object is considered to be extended to have the properties of a table, as opposed to a Object Relational Model (ORM) / Data Access Object (DAO) where the object is considered to be a representation of the database object. Philosophy aside, it’s a great tool, and we’re mostly interested in how to use it. It is worth noting that you can use Zend Framework along with the excellent Doctrine ORM… and the syntax is even pretty similar.

The general procedure when setting up Zend_Db is to create a bunch of objects that extend Zend_Db_Table_Abstract. When defining an object, you can define what table it connects to, what the primary key is, and any foreign keys that relate to it. Upon instantiating the object in your code, you can use it to build queries against it’s related table, which returns a collection of row sets for direct use in your applications. Today’s tutorial assumes that you’re very comfortable with looping and other control structures in PHP.

Continue Reading »

Written April 18, 2008 in linux, mysql, webdev

Some updates: Matthew Aslett, Marten Micoks on jcole.us: [ 1 ] Slashdot: [ 1, 2 ], Lukas Smith’s reaction.

Well, I guess it’s time to learn Postgres again. Sun Microsystems bought MySQL AB (The makers of the MySQL Database) in February, and now they’ve announced that …

Continue Reading »

Written February 21, 2008 in linux, mysql, sysadmin

Is your MySQL server running multiple processes with each running a single thread? Read this: Enabling Threading in MySQL. Ran into this on someone else’s legacy server today.

Continue Reading »

Written November 25, 2007 in mysql, webdev

This has gotten bandied around a lot in a development group I’m in, so here’s my take. There’s lots of arguments for and against stored procedures. The linked article is quite old, but the article and the comments quite well cover the issue.

Continue Reading »

Written November 23, 2007 in mysql, webdev

MySQL has released a suite of GUI tools that rival Microsoft’s offerings for a RDBMS management studio. And bonus: They’re cross-platform.

Unfortunately, they’re building the suite on Windows XP — all of the tools either crash or cause serious problems on OSX and Vista, which are the two platforms I’m

Continue Reading »