Get MySQL date in RFC-822 format for RSS feeds
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.
Category MySQL
MySQL dump import -> Error 1217
When using innodb tables and foreign key constraints, importing a mysqldump can sometimes generate foreign key errors.
Category MySQL
Solve: Can’t connect to local MySQL server through socket /tmp/mysql.sock
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.
Category MySQL
Use regular expressions in MySQL SELECT statements
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.
Category MySQL
Modify an existing MySQL column
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.
Category MySQL
Create a MySQL table with a primary key
A primary key uniquely identify a row in a table. One or more columns may be identified as the primary key. The values in a single column used as the primary key must be unique (like a person’s social security number). When more than one column is used, the combination of column values must be [...]
Category MySQL
