Non classé

MySQL – Reminders

Get the list of users
SELECT User FROM mysql.user;

Add new user
CREATE USER 'user'@'host' IDENTIFIED BY 'password';

Create a database
CREATE DATABASE databaseName CHARACTER SET utf8 COLLATE utf8_general_ci;
* specify the character set and also the collation. Remember that stored procedure are created with the collation the database has and it will remain the same even if you change the database collation after.

Grand all privileges to user on a specific database
GRANT ALL ON databaseName.* TO 'user'@'%';
* in production, you should maybe limit the privileges.

Non classé

.Net C# Crystal Report / MySQL ODBC

Like many out there, I use Crystal Report for invoices and other kinds of report. What I like doing is exporting the result as a pdf on disk.

I just got a new laptop so I installed visual studio, mysql drivers,crystal report, etc…

If you have used Crystal Report for a while, you might have seen errors that are not so obvious. Let’s take that one.

System.Runtime.InteropServices.COMException (0x80004005): The system cannot find the path specified

You expect the problem to be related to the folder you’re trying to write to. Maybe something related to permissions.

So you check and everything is fine.

The problem might not be the folder.

If your application is running in “Any CPU” and you are on a X64 machine, be aware that Crystal Report will be in 64 bit mode so it will try to use an 64 bit odbc connection which it might not find because you created it in 32 bit mode. Doh !

Non classé

Migrating from MSSQL Express to MySQL

I’ve been busy this last 2 weeks working on a big enough migration from MSSQL Express to MySQL. It’s been long and somewhat complicated process if you consider the pitfalls.

Here is part 1 on the migration process. Part 2 will be on the reasons you should think it through before actually doing it.

Just to be clear, it’s not a rant about MSSQL, I love how MSSQL works but it doesn’t prevent me for enjoying MySQL.

Why would you migrate from MSSQL Express to MySQL/MariaDB ?

As the business grows, your needs too. There are questions you don’t necessarily care about at the beginning but they end up catching up to you.

Replication, Replication, Replication
Hardware failure, fire, water leaks. Wait! What ?!? Are you suggesting any of these will happen to me? Yes it will, at least one of them, most probably the hardware failure.

It might seems stupid but how long can your business afford to be down ? 5 minutes, 8 hours, 2 days. If your answer is in the minutes, backups are just not enough anymore.

MSSQL Express edition doesn’t have it.

More storage
At the beginning, 10 GB seemed like a lot but now not so much. As an IT person, you might know what the next technology is but at the business level, you never know when a huge customer will come in. That new customer might be the reason why you need more space.

You don’t see it as a problem when 2-3 users are using your app or website. Make that number, 200-300. The query is now taking longer to run. Being limited to 1 GB of RAM and 1 CPU when dealing with a growing database is calling for problems. Yes tuning might often be the answer but it goes only a certain distance.

Money, money, money?
In most small to medium businesses, resources are limited and should be used only on improving the business itself.

Unless you are working for a software company, the software you use is just a tool and not your core business. The decision making should be about getting the best tool you can at the price you’re ready to pay. If you need to get a regular hammer, will you chose the one you need or the shiniest one? At the end of the day, you just need to hit the nail, up to you to decide how much money you want to have left in your pocket.


Non classé

C# Add excel export feature to app.

Either it’s a web or desktop application, users have tools that they use and as developers we should make working with these tools easier.

Most users use Excel in their daily life when working with data. I think when the option to actually generate an excel file is available we should make use of it for their sake. Some will say that csv files do the work but in my experience it might work but it’s not always the best. Simply because some users don’t know how to open the csv files. We can’t assume the level of comfort of our users.

As for the ability to generate Excel files, please look into EPPlus at I started using it and it’s simple enough that you don’t need much time to learn it before using it.  I might give some examples in the future on how to use it.

It might be easier to stick with csv files or simply have no export functions but helping users should have an higher priority.

Non classé

Linux Mint 17 – Dell Inspiron 17 7737 – Trackpad

Hi everyone,

If, like me, you have a Dell Inspiron and have Linux Mint installed (Or Ubuntu) and have problems with your track pad when scrolling or dragging windows,  consult this page : It will save you from going insane.

In short, just go in the terminal and type the following:

1) sudo mkdir /usr/share/X11/xorg.conf.d/
2) sudo cp /usr/share/X11/xorg.conf.d/50-synaptics.conf /etc/X11/xorg.conf.d/
3) sudo gedit /etc/X11/xorg.conf.d/50-synaptics.conf
In this section,
# This option enables the bottom right corner to be a right button on
# non-synaptics clickpads.
# This option is only interpreted by clickpads.
Section "InputClass"
Identifier "Default clickpad buttons"
MatchDriver "synaptics"
Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
# To disable the bottom edge area so the buttons only work as buttons,
# not for movement, set the AreaBottomEdge
# Option "AreaBottomEdge" "82%"

Remove the # before Option “AreaBottomEdge” “82%”

Save the document.

Restart the computer.

That’s it !

Non classé Technical Support

Windows server SBS2011 – Backup problems

If you are having issues with Acronis Backup and Recovery 11.5 and Windows SBS 2011 or Windows 2008 (including R2), it might be related to your hard drive.

Take a look at this page for the support hard drive on Windows :

First thing you realize is that 4K (4096 bytes)  per sector is not supported on every version of windows.

Before buying a new hard drive, you might want to make sure that it is 512 bytes per sector.

Hope I was able to save you some time.