Centos: Making sure your web services auto start after reboot

Your server had to restart, either by design or after some bad event, and now your website doesn’t work – “connection failure”.  Looks like your important web services are not set to start automatically on boot up.  Here is what to do to get your httpd and mysqld services running on restart.

Continue reading Centos: Making sure your web services auto start after reboot

Magento Error: Integrity constraint violation: 1062 Duplicate entry ‘123456’ for key ‘PRIMARY’

Following a database export/import as part of a migration  or copy to a new development environment some database problems can occur, even if the entire db is copied.  Sometimes the problem can be the log files references, as is likely with the error:

Integrity constraint violation: 1062 Duplicate entry  ‘123456’ for key ‘PRIMARY’

Where 123456 is some number.
Continue reading Magento Error: Integrity constraint violation: 1062 Duplicate entry ‘123456’ for key ‘PRIMARY’

Mysql: Export entire database via command line (and import it again)

Sometimes, when migrating servers or copying data to a development environment for example, one needs to take a copy of an entire mysql database. Here is how you do this via the command line on a redhat/centos server:

Continue reading Mysql: Export entire database via command line (and import it again)

Mysql: Change the full text index minimum word length

So you are trying to do a fulltext search but your searches for “cat” or “dog” always return zero results, even though you have articles all about cats and dogs. By default the minimum search text length for full index searches is 4 characters, anything less than that returns nothing, zip, nada, jack-all.  You need to change the minimum word length.

This can throw people using something like Magento whose product types or names are short, such as “bag”,”cup”, or “mug”.  The problem isn’t actually in Magento but a server setting. You might be kind of stuck if you are using a shared hosting environment – you can contact your hosting service and ask nicely.

Continue reading Mysql: Change the full text index minimum word length

mySQL (mariaDb) Useful User Management Via Command Line

Here is a collection of useful and common mysql commands for managing database users using the command line, perhaps whilst logged in to the server via ssh. The following commands work for MySql and mariaDb. Don’t forget to include the semi-colon at the ends of each command. Continue reading mySQL (mariaDb) Useful User Management Via Command Line