Netbeans on Windows XP

Posted in Java, MySql on November 30th, 2010 by phoenixdigital

Here are some tips for getting Netbeans working on Windows XP.
Read more »

Import/Export MySQL databases and other commands

Posted in MySql on June 16th, 2010 by phoenixdigital

Just a quick reminder of how to backup and restore MySQL databases.

nice mysqldump --opt -u [user_name] -p [database_name] | gzip > [backup_file].dump.gz
or
nice mysqldump --opt -u [user_name] -p [database_name] | 7za a -si database7z 20140306-database.dump.7z

To restore

nice gzip -d [backup_file].dump.gz
nice mysql [database_name] < [backup_file].dump

To create a database

mysql -u root -p
create database [the_database_name]

To change the database
use [the_database_name];

To show all databases
show databases;

To show indexes on a table
SHOW INDEXES FROM products;

To show all tables
show tables;
or
show tables like "test1";

Adding a user if following doesn’t work

CREATE USER blah
or
insert into user (Host,User ,Password,Select_priv ,Insert_priv ,Update_priv ,Delete_priv ,Create_priv ,Drop_priv ,Reload_priv ,Shutdown_priv ,Process_priv ,File_priv ,Grant_priv ,References_priv ,Index_priv ,Alter_priv ,Show_db_priv ,Super_priv ,Create_tmp_table_priv ,Lock_tables_priv ,Execute_priv ,Repl_slave_priv ,Repl_client_priv ,Create_view_priv ,Show_view_priv ,Create_routine_priv ,Alter_routine_priv ,Create_user_priv ,Event_priv ,Trigger_priv ,ssl_type ,ssl_cipher ,x509_issuer ,x509_subject ,max_questions ,max_updates ,max_connections ,max_user_connections) VALUES ('%', 'theUser', password('thePassword'), "Y","Y","Y","Y","Y","N","Y","N","Y","Y","N","Y","Y","N","Y","N","Y","Y","Y","N","N","Y","Y","Y","Y","N","Y","Y","","","","",0,0,0,0);

Reload all user tables and priveleges
FLUSH PRIVILEGES;

Tags: , , , , ,

Installing Apache, PHP and MySQL on OSX Leopard

Posted in MySql, OS X Tips, PHP Programming on September 10th, 2009 by phoenixdigital

These instructions may not be 100% complete as I am writing this after the fact. However someone with a basic set of Unix skills can probably fill in the gaps. This post is primarily here to remind me of the basics involved. I will revisit this next time I install everything again from scratch.

Leopard comes with a built in apache server and PHP. All that is required is for PHP to be activated. MySql however is required to be installed.

Read more »

Tags: , , , , , , , ,