domingo, 1 de dezembro de 2013

Running BlueStacks on VirtualBox

THIS POST IS NO PROGRAMMING-RELATED (SHIT!). IF YOU'RE AFTER SOME EXCITEMENT,  STEP BACK!

Here is another tricky problem that I went through these days. I was trying to install BlueStacks on windows and I kept giving me an error that said my graphics card could not be found.
This is really simple to solve.

Go to your VM settings and enable 2d and 3d graphics. I also raise my graphic card memory, but I don't think that's necessary if it's just to use BlueStacks 64mb would be fine.

And that's it!

Bye!

segunda-feira, 14 de outubro de 2013

Solving MySQL Error "The server quit without updating PID file (/usr/local/var/mysql/XXXX.pid)"

Today I ran out through this problem when trying to start mysql service. It took an hour to solve, and the problem wasn't really with MySQL.
If you look at the log it creates inside the mysql data folder you'll see several of permission denied warning, and that's really it.

Simply change the permission of every folder inside mysql recursively to, say, 777.
* So, run terminal.app;
* Go the mysql folder;
* Type "sudo chmod -R 777 ./*" (don't you dare to type the quotes);

Done. Try to start the server again, and it should work like a charm.

I'm using OSX 10.9, but I think it works for every linux/unix systems.
See u.

quinta-feira, 10 de outubro de 2013

Build MySQL Driver for Qt 5 on Mac OSX Mavericks

That bugged me for awhile. But when I tried to compile the MySQL driver for Qt it compile fine. But somehow when putting the file inside the QTDIR/.../plugins/sqldrivers it wouldn't work! I just kept getting driver not loaded. And when calling QSqlDatabase::drivers() MySQL just wans't there.
Finally I found the solution:
  • open the terminal
  • navigate to sqldrivers on QTDIR folder
  • and run the command:
install_name_tool -change libmysqlclient.18.dylib /usr/local/mysql/lib/libmysqlclient_r.18.dylib libqsqlmysql.dylib

Now it works just fine!