Wednesday, February 29, 2012

Installing InfoBright database VM on Windows 7 with VMWare Player

1. Get Inforbright community edition (ICE) here: http://www.infobright.org/downloads/vm/ice32_352.zip
2. Get VMPlayer from vmware.com. Free registration required.
3. Run ice32.vmx file - WMPlayer opens.
4. In WMPlayer, "Virtual Machine->Power-Stop" - stop the VM and reconfigure to what you need: give it more CPUs and more RAM if needed. The default values are 1GB RAM and 1 CPU.
5. Restart VM
While rebooting you will see VM IP. Write it down.
Once VM goes up, point your web browser to that IP. You should see ICE32 web page with access credentials.
6. Login with
user: ice
password: infobright
7. Go to VMPlayer and run
mysql-ib -u root
8. Run in MySQL client the following command so you can access MySQL from another machine (e.g. from the machine where the VMWare is installed) -
grant all privileges on *.* to 'root'@'x.x.x.x' with grant option;
Note: The default install of InfoBright Database on VM is configured with user root with no password.

Now you should be able to connect to InfoBright running on your VMWare Palyer from an external machine.

9. Connection: The default port is 5029. You can check it out in my.cnf file (port=1234)

10. in VMPlayer (Ubuntu):
sudo /bin/bash
- change to root this way and edit /etc/my-ib.cnf if required.
For instance, add
max_heap_table_size = 1024M
under
[mysqld]
section

11. Restart Infobright DB:
sudo /etc/init.d/mysqld-ib stop
sudo /etc/init.d/mysqld-ib start

Friday, February 17, 2012

How to disable top administration bar in WordPress for all users in one SQL query (MySQL)

REPLACE INTO `wp_usermeta` (`user_id`,`meta_key`, `meta_value`)
SELECT ID, 'show_admin_bar_front', 'false' FROM wp_users

Next, you can can run an UPDATE query removing this row for all users who have administrative permissions.