Mysql: page 1
Code portability is the practice of writing code that can be easily reused or transferred between different environments, such as databases or frameworks, with minimal changes. By prioritising portability, developers enhance code maintainability, reduce vendor lock-in, and improve their own adaptability across projects and organisations. Read more ⇒
Alter a MySQL column in all databases
When you have a series of applications all running the same database structure it can be annoying to roll out schema updates across all the databases. If you’ve got migrations then great - script their deployment, but when you’re dealing with an old legacy application you probably don’t have the luxury. I was firmly in the latter class of devops when working on a project a couple of years ago so I wrote a handy little snippet of SQL to help me out. Read more ⇒
When you’re working in a team you need ways to easily share and denote good style and taste. This is true of your primary programming language with PEP8 for Python and PSRs 1 & 2 for PHP being well known. There is probably even a style guide for HTML and CSS set out at your company. So why should SQL miss out on the party? I have written a style guide for SQL to promote a consistent code style ensuring legible and maintainable projects - sqlstyle. Read more ⇒
Installing a MySQL UDF errors with Function already exists
When installing a UDF recently I got an annoying error message, which didn’t seem to want to go away. Deleting the function before attempting to remove it did not work so I used the following set of escalating commands to attempt to get it to install. But back to the error for a moment: bash > mysql -u user -p < installdb.sql Enter password: ERROR 1125 (HY000) at line 7: Function 'lib_mysqludf_ssdeep_info' already exists This can be solved really simply with the following options: Read more ⇒
A Good Windows Development Environment and Ubuntu Virtualbox
Often Linux just does it better! Often I find myself developing a Windows machine without access to a Linux development server, but I still need to access to some of the Linux binaries and features such as cron jobs, the at command and binaries such as imagemagick, pdftotext, etc. Some things can be emulated with ported binaries or through Cygwin, but I feel a lot more comfortable developing on a platform that is representative of the live server the web site will run on. Read more ⇒
Recently I produced a website for hosting on a Linux box running with PHP5 and MySQL5. Well it now needs to move over to a Windows 2003 server with MS SQL as the DB and IIS as opposed to Apache. Install MyODBC Install SQL Server 2005 Express Using MS SQL Server Management create a new database. (right click on databases in the Object Explorer) Use the following SQL Server SQL to create a link to your MySQL DB: Read more ⇒