Create new MySQL user and allow them to connect from any IP

mysqlIf you are getting the error: user is not allowed to connect to this MySQL serverConnection closed by foreign host

Or : Access denied for user ‘root’@’’ (using password: YES))

Then you probably have not created your user properly in MySQL
Here is how to create a new MySQL user and give him access to connect to the database from any location (local host or remote host).

Execute the following 4 queries – probably easiest to just run them from within the SQL section of phpMyAdmin (use the same username and password in queries 2 and 4 – these are the username and password you want to give to the new user you are creating)

CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
CREATE USER 'username'@'%' IDENTIFIED BY 'password';

(note, make sure you have told MySQL to listen for connections from all hosts and not just localhost)

MySQL See all columns and tables that foreign key to a table or column

mysql foreign keyIf you’re trying to understand how an existing database has been setup it can be very useful to see all of the tables/columns that foreign key into some other table/column.

REFERENCED_TABLE_NAME = 'your_table_name'
AND REFERENCED_COLUMN_NAME = 'your_column_name'

Ruby MySQL Transaction Example

rubyHere is a simple tutorial showing how to implement transactions in Ruby with MySQL.

The code uses The MySQL2 Gem. We are showing the insert of 2 records into the customers table of a database. If either insert fails, both will be rolled back.

require "mysql2"
client_mysql = =>; "localhost", :username =>; "my_user", :password =>; "my_password")
mysql_query_insert_customer1 = 'INSERT INTO MyDatabase.CustomersTable (name, phoneNumber, address) VALUES ("FSB", "888-555-5555", "322 Firstsearch Way")'
result_insert_mysql = client_mysql.query mysql_query_insert_customer1
mysql_query_insert_customer2 = 'INSERT INTO MyDatabase.CustomersTable (name, phoneNumber, address) VALUES ("FSG", "887-555-5555", "322 Firstsearch Road")'
result_insert_mysql = client_mysql.query mysql_query_insert_customer2
rescue Exception => e
puts "+++++++ DB ERROR - ROLLING BACK ++++++++"
puts e #print the MySQL Error
client_mysql.query('rollback') #rollback both of our insert statements
exit #exit the script/app (you might want a softer touch)
client_mysql.query('commit') #commit the changes to the DB

Setup a new GIT repository

gitHere is a quick reminder of how to setup a new git repository on your git server and check it out on your client machine.

On The Server

cd /opt/git
mkdir newproject.git
cd newproject.git
git --bare init

On the Client

cd /home/user/projects
git clone [email protected]:/opt/git/newproject.git
cd newproject
git add .
git commit -m 'added new README'
git push origin master

Medical Alert Systems for 2013

medial alert systemAs our loved ones age, their safety becomes of real concern to us, especially when they are living alone or have a disability or illness. These days, we all lead extremely busy lives and we don’t always have the time to call around and check in on our elderly friends and relatives as much as we would like. Which means having the ability to keep track of, and monitor their safety from a distance becomes more and more necessary.

For years, countless manufacturers have tried and failed to come up with an innovative medical alarm system that both looks attractive and inconspicuous and works, no matter where the wearer might be. Unfortunately all of these designs have been, large, cumbersome and unsightly and most seniors refuse to wear them. Coupled with the fact that all of these medical alert systems only work within the confines of the wearers own home, it is no surprise that their success has been fleeting.

This has all changed however with the launch of the new medical alert system from Amulyte ( Also known as a Mobile Personal Emergency Response System (MPERS) the Amulyte is attractive, discreet and most importantly incredibly functional.

As a wearer, the Amulyte Personal Emergency Response System keeps you within constant reach of your loved ones and caregivers. Simply press the button on your Amulyte Alert System and they will be notified immediately; allowing you the freedom to do as you please when you please. No longer are you required to stay within range of the home base station that other medical alert systems require. Using the same technology a cell phone, the Amulyte medical alarm system eliminates the need for a base station, giving you the freedom and security to go anywhere you please.

As a friend, relative or carer  you can have complete peace of mind knowing that your loved one is always safe. The activity tracking facility allows you to monitor any changes in their level activity and learn when something changes. You can rest assured knowing that should your loved one require attention you can be notified immediately via text message, phone call, email or online via the Amulyte web portal. Amulyte is also fitted with an automatic fail-safe system should your loved one fall or become incapacitated and unable to activate the personal alarm manually.

Key Features of the Amulyte Medical Alert System

  • Help Button – An easy to press help button that will automatically connect your loved one to you if they need assistance.
  • Works Anywhere – Whether going for a walk or running errands, the pendant works anywhere, both inside and outside the home.
  • Easy to Wear – Can be worn as a necklace or a belt clip, designed to look good and be comfortable.
  • Waterproof – Can be worn in the shower, in a pool, or out in the rain.
  • Real Time Alerts – Get notified instantly if something isn’t right via text, phone call, email and online notification.
  • Status Update – Get a daily recap of a senior’s activity level, keeping you informed and letting you know that everything is OK.
  • Activity Tracking – Tracks when your loved one is moving, and the level of activity.
  • Lifestyle insights – Discover activity patterns, average activity level and learn when something changes.
  • Peace of Mind – If help is needed you will be the first to know, rest assured knowing your loved one is safe.

Give yourself and your loved one peace of mind by giving an Amulyte.

For further information visit the Amulyte website

Atmel SAM-ICE Debug Error

atmel sam4l errorFailed to launch program

Error: reading arm chip id failed

This error is caused when the JTAG interface is selected in the Tool section of the Project settings.

To fix the the issue, select SWD from the drop down.

We initially thought that the SAM-ICE was only a JTAG debugger and didn’t work with Serial Wire Debug. Turns out it only works on SWD.

More info here:




5 easy tips for making your YouTube videos as shareable as possible

People love to watch videos online, and luckily YouTube, the biggest name in the video hosting space, makes sharing this type of content a breeze. But you can’t just upload anything and expect it to become the next viral sensation. In order to increase the viral potential, you need to make your YouTube videos as easy to share as possible.

1. Make Sharing Your Call to Action

Some of the most successful YouTube videos blew up because they contained a strong call to action. Kony 2012 was a prime example. Although the purpose of the campaign was to make Ugandan war criminal Joseph Kony famous enough to be recognized and subsequently apprehended by international authorities, it asked viewers to take specific actions as well. Those actions were ordering action kits containing media designed to help spread the word, and bringing the crimes of Joseph Kony to the attention of their local government. In this case, you want viewers to share and sometimes, it isn’t a bad idea to come out and say just that.

2. Educate on Sharing

YouTube makes sharing content incredibly easy. It also allows users to do so in a variety of ways. For example, they can do so by linking to the video, embedding it on a third-party site, or directly sharing it on a social media channel like Facebook or Twitter. However, despite being a rather straightforward process, not everyone is aware how to do this. So if creating a viral effect is your goal, use the description space to clearly explain how viewers can share your videos in their social networking spots and beyond.

3. Encourage Sharing Through Social

The cool thing about Facebook, Twitter, and other social networks is that they offer pretty strong support for YouTube. This is great news for video marketers. Your content can be shared from YouTube, or directly on one of these sites. The key, of course, is convincing users to take the initiative. Again, it wouldn’t hurt to be straightforward by letting your social fans and followers know that you want them to share your video content.

4. Add Sharing Buttons in Your Emails

Email marketing and social media have proven to be an excellent match over the past couple of years. There are plenty of ways to integrate these two channels, but one of the easiest is adding social sharing buttons in your email campaigns. This also happens to be an effective way to make your videos shareable. If your subscribers are already familiar with this functionality, all it will take is some compelling content to get them to clicking.

5. Create Quality Videos

And finally we have reached the biggest point of all – the importance of creating quality videos. People do not share content just because it’s an easy process. If it does not interest them, don’t even worry about them sharing it, because chances are, they won’t even watch it.

YouTube is powerful stuff, but your videos will just sit there if you don’t take the effort to make them the best they can be. Put these tips to use, and you can be on your way to better exposure.

Author Bio:  Chiko Noguchi is a best practices activist and advocate for a leading provider of email marketing services.

How to Find a Good Roommate on Craigslist

Although it’s not ideal to live with a stranger, sometimes it’s necessary. If you’ve moved to a new city and don’t know anyone, for instance, you might need to share a living space with a stranger to cut costs. Or if your former roommate moved out, and you need someone to move in with you fast, you might need to live with a stranger. One of the most popular places to find roommates online is craigslist. Generally, craigslist works out for those seeking roommates. Sometimes, however, things go awry. People pretend to be someone they’re not on craigslist or end up being unsavory roommates. If you’ve decided to go the craigslist route for your roommate search, there are some things you can do to increase your chances of finding a good roommate. Here’s what you should consider doing:

Create an ad

If you already have a living space, and you’re looking for a roommate to move in with you, you should post an ad that indicates you’re seeking a roommate. You can do this on the “rooms & shares” page on craigslist. In the ad, you should mention how much rent will cost, where you live, and what kind of roommate you’re looking for. If you don’t want to live with a smoker, for instance, you could mention that in your ad. You may also want to write a little bit about yourself, perhaps that you’re a student or work in the medical field or that you enjoy living in a quiet, calm space.

Check out who’s looking for a place to live

The “housing wanted” section on craigslist is full of postings from people looking for roommates to move in with. Browse this section and search for roommates you think you might be compatible with. If you find some who seem like they could be good fits, send them emails and arrange dates and times to meet.

Screen potential roommates

Once you’ve communicated with a few people who are interested in moving in with you, you can begin to screen potential roommates and ultimately find the right person to live with. It’s generally best to meet with people you’ve communicated with on craigslist in a public place. So, arrange some times to meet up with prospective roommates at a coffee shop or restaurant. Spend some time talking with them and determine who you think you’d get along with the best.

Conduct a background check before you agree to anything

Someone can be, by all appearances, nice and emotionally stable. However, you never know someone’s true colors until you actually move in with them. It’s generally a good idea to run a background check on the prospective roommate you think you’d like to move in with. You can do this online, or you can ask your prospective roommate to send you a copy of a background check he or she obtained. If your potential roomie doesn’t have a questionable past, it’s probably safe to move forward and set up a living situation agreement.

Watch out for scammers and people who aren’t telling you the whole truth. Trust your gut, and pick the roommate you think you’ll get along with best. Your living situation matters. So, do your homework, consider the tips above, and find a good roommate!

Jane Smith’s informative blog posts can help you make sense of any personal history situation. Whether you are pursuing a tenant background check or pulling an employee’s criminal record, feel free to email her at [email protected]

Patent Suggests that Apple is Considering a Flexible Screen Component

According to Mashable, Apple submitted a patent application revealing a possible integration of flexible OLEDs (organic light emitting diode) that could bend with the existing Apple Smart Cover.

The Ultra-Cool Concept

The patent sketches serve up possibilities that make Microsoft’s Surface Tablet seem dull. The Apple Smart cover is a flexible cover that protects the iPad screen. It is also supposed to fold to support the tablet, though the product has fallen short in that regard.

A flexible screen attachment, according to the sketches, would not be completely connected to the Apple Smart Cover, but would be its own element. This means that the Smart Cover could be used to stabilize the iPad, while the OLED could be spread flat as a keyboard. (Take that Surface Tablet!) This feature would appeal to the iPad’s existing fan base of college students and could possibly spur tablet technology to overtake laptops as the choice for mobile devices.

The OLED screen could also be used as a drawing surface, message board or a second screen. The flexibility of the screen could also allow it to be folded into a stabilizer for easier media viewing. Although it’s just a patented idea, not a full-fledged commitment, the concept definitely gives us something to think about in terms of the future of screen technology.

Unfolding a Vision of the Future

I first saw the flexible screen display during the Las Vegas Tech Convention earlier this year, but Samsung announced in 2011 that it would begin shipping flexible screens in 2012, saying that it had already amassed large orders. (I have yet to see it in the U.S.)

Samsung and Apple have worked together in the past for screen technology, and this patent definitely hints at future collaboration. Though Nokia announced a phone prototype with a bendable screen last year, it seems that the tablet will be the starting point for this trend to unfold. (Unless the iPhone 5 comes with a big surprise! A flexible screen would solve the phone’s durability problems.)

Flexible screens could have a variety of uses, melding paper and computer uses such as displaying information of a hospital patient’s armband. Bendable wrist computers for military use are also in development. In the next era of technology, any surface can be a computer – even the sides of buildings.

Although flexible screens seem to be the next big wave of the future, there is still plenty of time before the market adjusts to these new concepts. We may be waiting another 3 years before any product actually hits the mass market, but I’m keeping my eyes and ears open.

Katheryn Rivas is a regular contributor to Online University. Like the name suggests, the online universities blog focuses on higher education and trends. She welcomes your comments at [email protected]

Top 10 Obstacles You Must Overcome to Create a Successful Internet Weight Loss Business

Obesity has become a major health issue over the last two decades and over fifty per cent of adults say they want to lose their spare pounds. However, if you want to establish an internet weight-loss business you need to be aware of the most common obstacles.Capital

Setting up an internet weight-loss business does not have to involve a large amount of capital. It can be a venture that can be brought to market without spending much. With so much competition in this sector, however, it must have value-added features such as e-books, one-to-one online coaching and fitness products to encourage exercise.Getting on the Web

It is a common misconception that getting a web presence is costly and difficult to do. It is easy and cheap to register a domain and it is not necessary to spend vast sums of money on the design of the site. You can use a template to create web pages at little or no cost.Attracting Customers

A successful internet business depends on building up a large client base and there are several ways to do this. Having incentives on the site, such as free diet plans, encourages people to tell their friends, family and colleagues. Use key words and phrases for search engine optimisation or invest in pay-per-click advertising to increase visitor numbers.Taking Action

Even if you have an idea for a great diet and exercise website it is easy to procrastinate. Preparation is important and you need to have a good long-term business plan but you should also have weekly and day-to-day schedules with clear goals, such as target number of clients signing up, writing motivational emails and updating social media.No Room

One advantage of setting up an internet weight-loss site is that it can be home based but this can cause a problem with space being a premium for many home workers. However, dongles can be used for remote access to the web, making the home office entirely portable. Entrepreneurs can literally work from anywhere.Lack of Motivation

Starting an internet business requires the same discipline as losing weight. You need to stick to the business plan in the same way that a dieter keeps to their diet. Even if immediate success isn’t achieved, persistence will usually pay off.Being Complacent

Losing weight takes time and it is imperative to maintain the clients’ interest in continuing to subscribe to the website. Offering inducements such as free dongles can encourage dieters to log on to the site, whether they are at home, in the office or even on holiday. Although this is a cost to the business, it can be a worthwhile investment.Marketing

Social-networking sites have become a very influential marketing tool and there is little or no cost involved. You can use Facebook to create a profile for your business and a place for clients to discuss their diet successes. Twitter can be used for succinct messages to potential and existing customers and can you can also use it to send daily messages of encouragement.Retaining Customers

Dieting by its very nature is an ongoing process and this should be at the heart of an online weight-loss business. Enabling a healthier lifestyle is key to retaining customers and an imaginative maintenance programme that allows the dieter to keep to their target weight over months and years is vital. Always remember that it is easier to retain existing customers than to attract new ones.The Law

It is vital that an online weight-loss business stays within the law with regard to any of the products that it sells. You must make sure that none of the supplements contain any ingredients that are banned and that no exaggerated claims about possible weight loss are made. A successful business will be ethical and stay within the law.An online weight-loss business is a fantastic way to become your own boss. It can be cheap to set up and fairly simple to operate. The number of potential customers is vast. Self-belief and hard work are paramount and you should recognise that each achievement, however small, is one step nearer to success.


Eva K is a diet guru and fitness consultant. She often uses dongles to go online and finds them indispensable for anyone running an internet business.