MySQL tutorials

Get MySQL date in RFC-822 format for RSS feeds

contributed by qmchenry on June 19, 2006 under MySQL

To get the PubDate element of an RSS feed to validate, it needs to be in RFC-822 format. MySQL has flexible ways of working with dates and times which make this a simple task.

 

Show or list tables in a MySQL database

contributed by webgod on February 22, 2005 under MySQL

Once you have selected a database, you can list the tables in it by using the show command.

 

MySQL dump import -> Error 1217

contributed by dionak on December 20, 2004 under MySQL

When using innodb tables and foreign key constraints, importing a mysqldump can sometimes generate foreign key errors.

 

Solve: Can’t connect to local MySQL server through socket /tmp/mysql.sock

contributed by qmchenry on October 31, 2004 under MySQL

A frequent error message received when using the mysql command line utility is: Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ While this error message can be frustrating, the solution is simple.

 

Use regular expressions in MySQL SELECT statements

contributed by qmchenry on June 30, 2004 under MySQL

A very cool and powerful capability in MySQL and other databases is the ability to incorporate regular expression syntax when selecting data. The regular expresion support in MySQL is extensive. This recipe reviews regular expression use in MySQL and lists the supported regular expression metacharacters.

 

Delete a column from an existing MySQL table

contributed by qmchenry on March 18, 2004 under MySQL

The SQL command in this recipe removes a column and the column’s data from an existing MySQL table.

 

Modify an existing MySQL column

contributed by qmchenry on February 8, 2004 under MySQL

The best laid plans of mice and DBAs oft go awry, so it is sometimes necessary to change the characteristics of a column after it exists and contains data. Beware whenever you make changes to your database — always make a backup first.

 

Add a column to an existing MySQL table

contributed by qmchenry on under MySQL

MySQL tables are easy to extend with additional columns.