Mysql Blog

Gitlab 500 Error on Login
Last edited on: 21/01/2014 - 11:43

If you run your own Gitlab server sooner or later you will be confronted with the message '500 We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly.'

»   Read more
How to use Drupal 6 bookcat module with FNProgramvare BookCAT 10
Last edited on: 03/02/2013 - 18:42

When I originally developed my Drupal 6 bookcat module as a CMS website version of FNProgramvare's BookCAT product, it was aimed at BookCAT version 8. Since then Fredrik's BookCAT has gone through two further revisions, and during that process the database schema has changed. This has led to problems with my Drupal 6 module and as a consequence I've introduced a solution which circumvents the necessity to redevelop my work or have multiple versions of my own.

»   Read more
Perl mysqlimport Equivalent
Last edited on: 26/04/2010 - 10:07

MySQL has a command line utility mysqlimport which imports CSV files into an MySQL database. In fact, mysqimport is a command line wrapper for LOAD DATA INFILE. Whilst constructing a price comparison website, I came across the problem of uploading merchant product catalogues, which could be 1,000,000 records+, into my MySQL database. The catalogues were provided in CSV format. Great, I thought, I'll use mysqlimport. My joy however was short lived - my host does not allow the use of the LOAD command from the filesystem. No problem, I thought, I'll use PHP.

»   Read more
openSUSE 11.1 to 11.2 Upgrade: Getting MySQL 5.1 to Work
Last edited on: 23/04/2010 - 10:00

A new version of MySQL, version 5.1, is part of the openSUSE 11.2 upgrade. Once you have got the basic openSUSE 11.2 upgrade working, you will discover to your horror that MySQL is not. There are a couple of changes made to MySQL at this release.

Firstly, The MySQL socket is moved to /var/run/mysql. So you will need to edit your /etc/my.cnf file. Open this file and change all occurrences of the socket path to reflect this new path. So, for example:

socket = /var/run/mysql/mysql.sock

This will occur more than once so make sure you change them all!

»   Read more
MySQL Find Column Name in any Table in Entire Database
Last edited on: 08/02/2010 - 18:58

It frequently happens, particularly when I am using Drupal, I need to find a name of a column that could be in any table in a database. There is a quick and easy way of finding this, and the syntax is:

SELECT table_name, column_name from information_schema.columns WHERE column_name LIKE '%Name%';

This need cropped up the other day when I was searching Drpual for all tables that contained a column with the name description. I used the command line interface, and my output is captured below.

/tmp> mysql -u root -p
Enter password:

»   Read more
MySQL Subqueries - a Useful Example
Last edited on: 01/02/2010 - 15:20

I can remember when MySQL hit the streets back in 1995 - it was quite a raw product but still extremely useful for some development I was engaged in on a Linux Softlanding platformed box. While MySQL grew to be more and more popular, Linux SLS withered and died due to its bugs, but was still responsible for spawning the Debian distro amongst others.

»   Read more
MySQL: Set UTF-8 Throughout
Last edited on: 01/02/2010 - 15:19

The MySQL manual states By default, MySQL uses the latin1 (cp1252 West European) character set and the latin1_swedish_ci collation that sorts according to Swedish/Finnish rules. These defaults are suitable for the United States and most of Western Europe. That's certainly true but only half the story. If you have ever developed PHP or Perl applications, sooner or later you are bound to notice inexplicable hieroglyphics in your website output. Closer inspection of these characters and you'll probably realise it is an apostrophe or an accented letter being rendered incorrectly.

»   Read more
Syndicate content