Category Archives: Uncategorized

MySQL allow external connections

Grant privileges

Under root user execute:

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password';
Bind to all addresses

Edit your my.cnf, generally located in bind-address = 127.0.0.1.

  • /etc/my.cnf
  • /etc/mysql/my.cnf
  • $MYSQL_HOME/my.cnf
  • [datadir]/my.cnf
  • ~/.my.cnf
#bind-address = 127.0.0.1

Restart mysql

service mysql restart

Rackspace vs AWS vs Internap

 

I wanted to make sure you saw the new research report from Cloud Spectator, Benchmarking a NoSQL Database on Bare Metal versus Public Cloud. Cloud Spectator’s benchmark tests confirm the price-performance advantages of running big data workloads in bare-metal environments over comparable virtual offerings from Amazon Web Services and Rackspace.

Example findings include:

  • Internap outperformed Rackspace by 5x and Amazon by 51% on throughput speed when loading data into the database.

  • Internap had 59% less latency than Amazon and 32% less latency than Rackspace when testing a balanced workload.

  • The equivalent monthly price of hosting an Aerospike database on Internap’s bare-metal servers was at least 78% less expensive than doing so on Amazon I2 or Rackspace Performance Server.

Introduction to NoSQL by Martin Fowler

 

 

Know more about  Martin Fowler.
NoSQL Intro by Martin Fowler.

 

Like a blog it captures small items on many topics which are mostly read through my feed. Like a wiki, however, each entry is a wikiWord as I try to organize the bliki through named concepts. I write the entries to be things that are valid for a long time, and most bliki posts are just as valid now as when I wrote them.

The bliki, like much of the website, has grown and now has over 400 entries. The tags are probably the best way to explore it. There is also a page with all the recent bliki entries. All bliki entries are put, with full text, into my news feed.

 

WordPress – backup and restore!

 

Export/Backup your MySQL database to a .sql
mysqldump -u [uname] -p db_name > ~/db_backup.sql
Copy the .sql file for other server

Copy the generated file, on your user’s home to the new server with scp.

scp ~/db_backup.sql [email protected]:/home/username
Create a new database to import it into

Login into the mysql

mysql -u root -p

Create the database

create database database_name;
Import/Recover your .sql files to mysql
mysql> use database_name;
mysql> source /full/path/your_file.sql;
Create and grant privileges for your NON ROOT user
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
Grant privileges for your NON ROOT user use it.
grant all privileges on database.* to username@localhost identified by 'password';
FLUSH PRIVILEGES;

 

Redis Autocomplete – 8 millions of entries

This is a demo of the new ZRANGEBYLEX Redis command. It autocompletes the query field using all the 8 millions of unique lines of the Linux kernel source code as autocompletion dictionary. 

Every time the user types something, the page sends a request to a small PHP snippet called search.php which sends a query to Redis, and returns the result to the web page as a JSON array.
As you type in the input field below, you’ll see the list of suggestions appearing. 

http://autocomplete.redis.io/
http://redis.io/commands/zrangebylex

https://gist.github.com/antirez/11126283
http://jqueryui.com/autocomplete/#remote