How Typical of MySQL

Story: Yanking The Window ShadeTotal Replies: 40
Author Content
DarrenR114

Jan 21, 2008
12:04 PM EDT
When I clicked on ¨Full Story¨, I received this series of errors: Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /home/helios/ public_html/blog/include/db/mysql.inc.php on line 263

Warning: mysql_select_db() [function.mysql-select-db]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /home/helios/ public_html/blog/include/db/mysql.inc.php on line 264

Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /home/helios/ public_html/blog/include/db/mysql.inc.php on line 264 serendipity error: unable to connect to database - exiting.

========================= This isn´t the first time I´ve received such errors nor is Helios´ blog the only site to fail for me because of MySQL. Sites like Groklaw, Slashdot and LinuxToday have given me the same failures.

MySQL is CR@P ... if you´ve got data worth storing, then it´s worth storing reliably ... and MySQL is a fscking toy when it comes to databases. At least use PostgreSQL, if you´re intent on maintaining a site that´s going to be around past tomorrow.
tracyanne

Jan 21, 2008
12:18 PM EDT
You may not have noticed such errors when surfing sites that use Oracle or MSSQL server, for example, as it's unlikely the developers would have allowed system type messages to be displayed for the general public to see. On all the sites I build we display a generic "Sorry an error has occured." type message.
DarrenR114

Jan 21, 2008
12:36 PM EDT
Having worked with Oracle for well over a decade and SQL*Server for about the same, I know from personal experience that SQL*Server isn´t much better in the quality than MySQL. Oracle, however, has NEVER given me such problems with data integrity and availability, and I deal often with schemas that contain hundreds of tables with many of them containing millions of rows.

MySQL is a steaming plate of DB doo-doo and no use of the Wookiee defense is going to change that.
dinotrac

Jan 21, 2008
12:48 PM EDT
Darren -

MySQL is a wonderful database. It must be, because everybody uses it.

All those problems you' ve encountered and the ones that I've encountered must be our own faults.

I'm still trying to figure out what's wrong with postgresql. It's never given me any trouble. Must not be working right.
Sander_Marechal

Jan 21, 2008
1:03 PM EDT
Never had any problems with MySQL and I've done some pretty big projects with it (phpBB forum that's large enough to be listed on bigboards.com). Never user Postgress so I can't speak about that. I did use MS-SQL quite a lot. Also for big projects. It's one of the worst heaps of cow dung I've come across. Marginally better than Exchange (which is the biggest I've ever seen) and about comparable with PHP-Nuke/Post-Nuke (which is a whole level of hell all unto itself).
dinotrac

Jan 21, 2008
1:24 PM EDT
Sander -

I'm glad you've never been subjected to MySQL hell.

Except for one very miserable time with a production database, I haven't run into things I couldn't repair with MySQL's repair utility. Still meant inconvenience and disruption, just not very big nor very long.

Postgresql, OTH, is a rock. I'm amazed more people don't use it.
rijelkentaurus

Jan 21, 2008
1:38 PM EDT
Quoting: I did use MS-SQL quite a lot. Also for big projects. It's one of the worst heaps of cow dung I've come across.


I'll second that.

I've played with MySQL and Postgres, but I haven't run into them in the workplace, so I can't speak on professional terms. However, I would imagine that MySQL has something going for it because Google makes such heavy use of it. Comparing features, Postgres does seem to be more geared to "big" enterprise apps than MySQL, but that's just my O.
thenixedreport

Jan 21, 2008
2:46 PM EDT
It appears to be working fine now. Of course, I was up at about 4:30 in the morning (my time) when I saw it. :)
herzeleid

Jan 21, 2008
3:21 PM EDT
Quoting: Warning: mysql_select_db() [function.mysql-select-db]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /home/helios/public_html/blog/include/db/mysql.inc.php on line 264
I'm hard pressed to see how you would blame mysql for the fact that somebody forgot to start mysql... Seems more like the responsible sa dropped the ball here.

From my own experience, mysql has been a fast, lightweight, trouble free RDBMS, especially for web applications.
Sander_Marechal

Jan 21, 2008
3:24 PM EDT
Yeah. It's back for me too.

Quoting:Comparing features, Postgres does seem to be more geared to "big" enterprise apps than MySQL, but that's just my O.


What I always heared (not really tested myself) is that MySQL is great for websites because it can query very fast. Writing OTOH is slower and there's no transaction support. Postgres is slower to query but has all the nice transaction support and enterprisey features you'd like for a database.

Note that this only really applies to MySQL using MyISAM tables. Using InnoDB tables you get transaction support and all that bling as well under MySQL but you loose the fast query that you have with MyISAM.
dinotrac

Jan 21, 2008
4:01 PM EDT
> Comparing features, Postgres does seem to be more geared to "big" enterprise apps than MySQL, but that's just my O.

It's more than features, IMHO.

MySQL has grown from a fast little file manager that could handle a large number of records. It lacked most features of a real relational database, but made up for them with SPEEEEEEED. Joins, for instance, blazed.

In time, they have purchased technology (InnoDB, for example) and hacked things into place in order to acquire more of the features people expect of a real relational DB.

Postgresql, however, has been a full-featured DB for a long time, hampered by it's academic origins, some creaky supporting utilities (psql, anyone?) and a reputation for being solid but S-L-O-W.

That ain't the case any more. Postgresql has added features to its solid base and has acquired significant lickety-splitness.

To me, it's a lot like Linux vs. Windows --

Do you trust the one that started on a heavy duty foundation and has been adding slickness and friendliness, or do you trust the one that started out more friendly and slick and has been beefing up the foundation?





herzeleid

Jan 21, 2008
5:10 PM EDT
Quoting: To me, it's a lot like Linux vs. Windows --
Funny, I don't see either mysql or postgres as being at all windows-like.

I see it as more like Linux vs FreeBSD: One came up as a full featured (some might say over-engineered) project with strong roots in academia, the other started out as a stripped down hot rod built to fit a particular need. Both were originally available only on unix platforms. One has gotten faster while the other has incrementally added features while retaining it's speed.

Each has it's place. I have to admit I like mysql because it's so little trouble, and it's still faster than a scalded cat, even with the full feature list and ACID compliant behavior. The postgres bigots who continually put down mysql are like the freebsd bigots who just can't get over their resentment of that upstart linux.

Come on guys, there's plenty of room for both of us in the marketplace. After we've put a big dent in the ms-sql market, maybe then we can argue about turf again., But until then, the enemy of my enemy is my friend - capice?

tracyanne

Jan 21, 2008
5:17 PM EDT
The point I'm making is not that mySQL is good or bad. It's the website that doesn't hide these system messages from the general user that are bad.
tuxchick

Jan 21, 2008
5:24 PM EDT
good point, tracyanne. I get a good giggle from ASP errors. Application Initialization Error, Invalid Cookie Specification, and the ever-helpful Unexpected error are some of my favorites. As you say, the site visitor should not be seeing these.
dinotrac

Jan 21, 2008
6:14 PM EDT
>the postgres bigots who continually put down mysql

Feeling a little defensive, are we?
herzeleid

Jan 21, 2008
6:19 PM EDT
Quoting: Feeling a little defensive, are we?
Not at all. I'm just calling a spade a spade. There are such people and I merely make the observation. As far as the "war" between mysql and postgres, I'm rooting for both.
dinotrac

Jan 21, 2008
6:28 PM EDT
>. There are such people

I haven't seen any in this conversation. I've used both in production and prefer postgresql, but still use mysql for some things.

Humans tend to be anecdotal -- our personal experiences weigh heavily in our preferences. I've had trouble with MySQL databases and have not had trouble with postgresql.

Someone with the opposite experience would likely take the opposite view.
herzeleid

Jan 21, 2008
6:33 PM EDT
Quoting: haven't seen any in this conversation.
LOL, yeah right...

Quoting: MySQL is CR@P ... if you´ve got data worth storing, then it´s worth storing reliably ... and MySQL is a fscking toy when it comes to databases.
Quoting: MySQL is a steaming plate of DB doo-doo
No siree, no bigots here...
dinotrac

Jan 21, 2008
6:49 PM EDT
>No siree, no bigots here...

I'm sure the views expressed are based on a careful review of the facts.
thenixedreport

Jan 21, 2008
8:21 PM EDT
MySQL is better for a CMS, forum, and blog than other styles because of performance. If my host, 1and1, were to utilize other database formats, my site, which is on a shared server, would slow down quickly.
dinotrac

Jan 22, 2008
2:11 AM EDT
>MySQL is better for a CMS, forum, and blog than other styles because of performance

But are you using the "new and improved" MySQL -- whatever the flavor of the day happens to be?

I seem to recall the performance gap between MySQL and postgres was primarily a function of using the original limited-capability ISAM tables.
tracyanne

Jan 22, 2008
2:42 AM EDT
Thanks TC, it's good to know someone is listening, the blokes seem to have gone off on a pissing up the wall contest.
jezuch

Jan 22, 2008
3:46 AM EDT
Quoting:The point I'm making is not that mySQL is good or bad. It's the website that doesn't hide these system messages from the general user that are bad.


...and it's PHP which makes it harder to prevent it which is bad too.
Sander_Marechal

Jan 22, 2008
4:38 AM EDT
Yeah. Error handling is one of PHP's Achilles heels. I sure hope that they fix that with PHP 6 and adopt a stance similar to Python: Everything is an exception. Right now, some PHP modules emit errors. Some exceptions. Some both (configurable) and some neither (relying on old-fashioned returning FALSE).

Other than that, I do like PHP though :-)
DarrenR114

Jan 22, 2008
4:40 AM EDT
>MySQL is better for a CMS, forum, and blog than other styles because of performance. If my host, 1and1, were to utilize other database formats, my site, which is on a shared server, would slow down quickly.

That's an age-old myth based on the way things *used* to be - 10 years ago. As MySQL has *tried* (and with minimal success) to become more enterprise-ready, their so-called "speed advantage" over PostgreSQL has disappeared. And their reliability issues, as so vividly illustrated with this incident, have not really improved.

If your data is worth Creating, Retrieving, Updating, Deleting (CRUD for you DB old-timers) then it's worth doing all that reliably. MySQL has not proven its reliability, in my experience (professionally speaking).

For those who claim that I'm bigoted against MySQL, you might want to re-examine your definition of "bigot". I'm not making these statements based on any "prejudice" (pre-judgment) because I've reached my conclusions about MySQL based on real-life experience.

DarrenR114

Jan 22, 2008
4:43 AM EDT
>Quoted: >>The point I'm making is not that mySQL is good or bad. It's the website that doesn't hide these system messages from the general user that are bad.

>...and it's PHP which makes it harder to prevent it which is bad too.

And blaming the scripting language for its inability to mask the database engine failures is something I'd expect from MS supporters.
pat

Jan 22, 2008
5:52 AM EDT
I'm with you 100% Anonymous DarrenR114. A lot of the problem is that mysql lets you shoot yourself in the foot and you don't even have to aim.
thenixedreport

Jan 22, 2008
7:13 AM EDT
"That's an age-old myth based on the way things *used* to be - 10 years ago. As MySQL has *tried* (and with minimal success) to become more enterprise-ready"

Read what I stated again. I never mention enterprise level, but for a CMS, forum, and blog. I also neglected to mention that the databases themselves on my site don't reach anywhere near 100 MB.
dinotrac

Jan 22, 2008
7:20 AM EDT
> I never mention enterprise level,

It's all in what your needs are, and even enterprises can make good use of MySQL for predominantly read-only tasks.

If you insist that an enterprise use one and only one tool for all of their db tasks, then, no, MySQL isn't enterprise-ready.

But --

large enterprises tend to have a diversity of applications.
gus3

Jan 22, 2008
8:07 AM EDT
Quoting:When I clicked on ¨Full Story¨, I received this series of errors: Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /home/helios/ public_html/blog/include/db/mysql.inc.php on line 263
I didn't realize MySQL printed such fantastic errors. How did it know that PHP was calling it from line 263?

That appears to be a design flaw by a PHP programmer. Either the module designer didn't offer the web programmer the option to deal with the error gracefully; or, the PHP module has the option, but the PHP programmer decided not to use it.
Sander_Marechal

Jan 22, 2008
9:05 AM EDT
I'm pretty good with PHP. The error isn't hard to catch.Not at all. It seems to be a flaw in Helios' CMS. I think it's Joomla.
dinotrac

Jan 22, 2008
9:10 AM EDT
> I think it's Joomla.

Cringe. I've been using Joomla for a site. I've got the old one (pre 1.5) because it took me FOREVER to figure out why 1.5 wasn't working on my server. Unfortunately, all of the nice programmer's doc is now for the 1.5 release. Grrrrrr.

Have found Joomla to be powerful and hair-pulling, slick and buggy. Not all of that is the fault of the CMS. Like all things PHP, it can be thwacked by regressions in PHP. My problems turned out to be a function of problems in PHP 5.0.4.
Abe

Jan 22, 2008
11:46 AM EDT
Quoting:Thanks TC, it's good to know someone is listening, the blokes seem to have gone off on a pissing up the wall contest.


Boys will be boys Tracyanne!



Sander_Marechal

Jan 22, 2008
12:59 PM EDT
Quoting:Like all things PHP, it can be thwacked by regressions in PHP.


That's the difference between being able to program PHP and really knowing PHP. I regulary test my PHP code across different PHP versions. I've written automated unit tests to make this easier for me. I rarely run into problems.

Most problems occur with packages who want to run on PHP4 and PHP5. There are quite a few gotcha's when trying to run PHP4 code on PHP5. I use PHP5 exclusively for all my work and I don't support PHP4. This avoids most problems automatically. The rest is just a matter of proper programming practices. I don't rely much on esoteric PHP functionality or things that "should work". I test, write checks and failsafes and generally try to keep my code as simple and straightforward as possible.

Not that PHP has it's fair share of problems, but it's not as bad as a lot of people make it out to be. The only thing I really dislike is it's haphazard error/exception handling.
herzeleid

Jan 22, 2008
5:07 PM EDT
So DarrenR114 - you say that mysql is garbage, a toy at best, based on your experience, and that your viewpoint is not an example of bigotry. I don't doubt that you might have had some bad experience, but that sounds like an anomalous data point to me.

My own experience with mysql has been good. I originally started using it because I wanted a web database and mysql was not only lighweight and easy to use, but blew the doors off postgres, which I had also used.

Mysql isn't a replacement for oracle, but it is a perfectly fine database in it's niche. We're using mysql on linux as the back end for spam quarantine database which has 17,000 busy users. The database is around 40 GB in size, not gargantuan, but not tiny either. It's held up amazingly well in 24/7 use since 2005.

I'm curious about the folks who say its speed is due to the MyISAM storage engine - I've found mysql to be *much* faster with the innodb table type, than with MyISAM. With MyISAM, you can't lock a row, but have to lock an entire table. With innodb, you can do row-level locking and that makes a *huge* difference under heavy database activity.

And fast for read-only? sure, but I've found it pretty fast for writing as well. But don't believe me - why not ask slashdot, live journal, google?

I leave you with this question: why did sun just pay a cool billion to buy Mysql AB, if mysql is really just a crappy little toy as you say?

dinotrac

Jan 22, 2008
6:33 PM EDT
>why did sun just pay a cool billion to buy Mysql AB

For the same reason they bough Star Division?

Or Cobalt?
herzeleid

Jan 22, 2008
6:46 PM EDT
Quoting: For the same reason they bough Star Division?
To open source it, then offer a commercially supported version as well?

Quoting: Or Cobalt?
Aha, to kill it off?

In any case, amusing speculation - but back to my still unanswered question: why did sun pay a billion if mysql is worthless? do sun have too much money?

jdixon

Jan 22, 2008
6:48 PM EDT
> Or Cobalt?

That's the one that worries me. Cobalt had good products and Sun killed them, whether through neglect or malice (I've heard arguments made both ways).
dinotrac

Jan 23, 2008
4:35 AM EDT
herzeleid -

Sigh.

Yeah. Sun makes nothing but golden investments.
Abe

Jan 23, 2008
6:55 AM EDT
Quoting:why did sun pay a billion if mysql is worthless? do sun have too much money?


Sun bought MySQL for multiple reasons, killing it off is not one of them. They simply can't since it is GPLed and can be forked by anyone.

The group at the helm today don't share the same ideas with the people of the past. The new group knows, for Sun to survive, or any company for that matter, they can't just depend on hardware any more, they need to get into the IT service business. MySQL opens the door into the database area.

gus3

Jan 23, 2008
8:51 AM EDT
Quoting:Sun bought MySQL for multiple reasons, killing it off is not one of them. They simply can't since it is GPLed and can be forked by anyone.
As I pointed out in another thread, that's true for the MySQL software, but not for the MySQL documentation. Any fork must create all-new documentation from scratch.

Posting in this forum is limited to members of the group: [ForumMods, SITEADMINS, MEMBERS.]

Becoming a member of LXer is easy and free. Join Us!