Showing posts with label MySQL. Show all posts
Showing posts with label MySQL. Show all posts

03 October, 2011

MySQL Workbench crashes on startup under Windows 7 64-bit

MySQL Workbench crashes on startup.

This problem appears because of normal users install 64-bit libraries (.Net Framework and Visual C++ Redistributable) for 64-bit Windows 7.

But MySQL Workbench compiled with 32-bit binaries and required 32-bit libraries. So you have to install Microsoft Visual C++ Redistributable x86 (!not x64).

30 October, 2007

MySQL shell scripting

MySQL is the best. The best database server. I love it.
I like and appreciate its simplicity, efficiency, small size, good help, cool shell utilities. And its price :-)

I've worked with MySQL many years. And I can't understand some another database systems like Oracle, that big, heavy and high-priced. I can't stand theirs complexity.



You can use this server as you want. You can embed it into your application.
MySQL also pretty good in the console.

You can execute sql script from file e.g.:

data.sql

insert into Sample (name, address) values ('sample name', 'sample address');



with the simple command:

exec.cmd

@echo off
SET DATABASE_HOST=localhost
SET DATABASE_NAME=db
SET DATABASE_USER=root
SET DATABASE_PASSWORD=********

mysql -h %DATABASE_HOST% -u %DATABASE_USER% -p%DATABASE_PASSWORD% -e "source data.sql" %DATABASE_NAME%


and dump data from database with this command:

dump.cmd

@echo off
SET DATABASE_HOST=localhost
SET DATABASE_NAME=db
SET DATABASE_USER=root
SET DATABASE_PASSWORD=********

md tables
mysqldump --compact --no-create-info --tab=tables -h %DATABASE_HOST% -u %DATABASE_USER% -p%DATABASE_PASSWORD% %DATABASE_NAME%


For these purposes you should have only 2 files from mysql: mysql.exe and mysqldump.exe