Setting up a remote MySQL database with Laravel 5

Using a tutorial on DigitalOcean I successfully migrated a project that was running on a single droplet onto two droplets, a database server (running MySQL 5.7) and a web server ( running PHP 7.2). I’m happy with the outcome but there were a few hurdles I thought I would make a note on.

First, Laravel 5 uses The PHP data objects extension (PDO) to connect to MySQL. In the aforementioned tutorial, MySQL was set up to accept only secure connections. This can be handled in Laravel by adding an options attribute to the database configuration containing some PDO constants. These constants point to the keys that I copied over from the database server after running sudo mysql_ssl_rsa_setup --uid=mysql.

'mysql' => [
    'options'   => [
        PDO::MYSQL_ATTR_SSL_KEY  => '/path/to/client-key.pem',
        PDO::MYSQL_ATTR_SSL_CERT => '/path/to/client-cert.pem',
        PDO::MYSQL_ATTR_SSL_CA   => '/path/to/ca.pem',

I had to utilize PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT => false because the database server was refusing a connection. This constant was introduced to overcome a known bug in PHP.

Second, I was experiencing major lag when connecting to the database server. I thought utilizing private IP addresses, instead of public IP addresses, might fix the problem but I did not notice any improvement. Ultimately, I discovered DNS host name lookups was causing my problem.

If you have a very slow DNS and many hosts, you might be able to improve performance either by disabling DNS lookups with --skip-name-resolveMySQL

Since I’m using IP addresses, it made sense to go ahead and disable it in mysql.conf.d as depicted below.


After learning those additional steps, I have a working remote MySQL set up. On to the next task!

Illustration Work

Designing My Logo

I spent the last few days playing with logo concepts in Adobe Illustrator; in lieu of writing on the blog. I came up with several concepts that gradually led to a logo I’m very happy with. I’ll briefly walk you through the major logo concepts I created.

It’s important to understand that I didn’t just come up with these ideas out of thin air. Each step and idea led me to the next.

The first ideas you’ll see revolve around another personal domain of mine where Lewis was the only part of the domain name that was a personal identifier. Designing a logo for this first domain, my online identity, showed me that branding myself under the domain wasn’t the right path.


My approach above was to utilize the first letter of my last name in the design. I ultimately moved past these concepts because I felt my identity was lacking. It also convinced me that I needed a new domain.

After I purchased this domain, I started playing with my initials. The next image shows a logo concept using basic squares. Once I could see the possibilities, I refined the concept so that I could visualize it better.


Once I was able to visualize the idea above, I started toying with the D because I felt it was too boxy. Once I rounded the D below, I realized it might look good using negative space.


I watched a fair bit of TV when I was younger and one of my favorite channels was USA. I think I like the results of my logo conquest because it reminds me of the USA logo. More importantly, it represents me. You can see the final version below.


My next task for this website is to create a header using the new logo. Hope you like it. Let me know what you think in the comment section below.


The Worst Client in the World

The worst client in the world is yourself. When I take on personal projects, this website for example, I find myself to be the worst client. I’m not easy to impress.

I would like to design a logo for this website. I have no idea what I want. When I find something that I think might work, I’ll love it for a week or two and then discover another approach that I fall in love with. That’s when you know you haven’t found the right approach yet.

Working for yourself, when you are the client, is the hardest job in the world. Deadliest Catch has nothing on me; I even ride on a steel horse.

I will share my workflow and the thought process behind each idea.

Illustration Work

My Workflow in Adobe Illustrator

One of my first creative interests was drawing. I would look at Disney characters in books and then try to draw them myself. I wasn’t great, but I wasn’t bad either. I actually came across some of the characters I drew not too long ago and was impressed by my younger self. I also really enjoyed it.

I still like to express my creativity today. Not having the use of my hands makes drawing less fun with a paper and pencil. Nowadays, I enjoy opening up Adobe Illustrator. I always see advice on the Internet about getting your ideas down on paper with a pencil first. It’s a boring argument for me.

Starting your design in Adobe Illustrator isn’t easier, but my choices are limited. One trick that I have been doing is a trick that I Just saw mentioned by Aaron Draplin in his Skillshare video Aaron Draplin on Working Efficiently and Illustrator – Vectors Are Free. A short video with great advice.

The idea is that you duplicate your work after each change. It gives a visual reference to previous ideas and allows you to go back and start again from a previous iteration. He does a good job of showing this approach in the video.

For me, I have found that this approach helps replace the, “jot it down with paper and pencil first,” advice preached by so many gurus.


Clutter & Chaos

I’m always surprised by how good it feels to clean and de-clutter. I’m also surprised at how easily it is for chaos to take over and clutter everything back up. It’s a constant battle, but one well worth fighting.

I cleaned up my computer’s desktop today and found that I did not need 95% of what I kept. Having that clean desktop in the background directly impacts my productivity positively.

Like my computer desktop, I also like to keep my physical desktop clean. It too translates to better productivity. Without clutter, my mind is less distracted and I’m more easily able to focus on what I’m doing.

My wife on the other hand might argue that a space should have a lot of personality. Unfortunately, with regards to desks, this makes the space vulnerable to clutter and chaos.

When in doubt, keep it simple and clean to avoid inviting chaos.

Self Improvement Work

On Writing Well

It’s currently 15 minutes before I get into bed. I can’t delay the inevitable. That’s one downside of having to count on others to get you into bed. But I haven’t written anything for today. I thought quite a bit about what I might write, but I didn’t take action and actually write anything.

So, I’m writing about my procrastination about writing today’s post. I did a fair bit today, but I did not write until now. That’s disappointing. It’s a daily goal of mine.

I think I need to start writing first thing in the morning. I’m not typically productive first thing in the morning but I am productive after I get the ball rolling.

Implementing this change would also help me avoid wasting time thinking about what I might want to write about. It’s a complete waste of time because the energy in thinking is not acted upon. Thoughts are lost by the time I write. This is also counterproductive to my end game.

I need to make changes that will help me write and articulate a thought in that very moment.


Future of Web Design & Development

The way I see it, there are three camps for web design & development. In one camp, you have freelancers and agencies. In another, you have in-house teams devoted to design and development. Lastly, you have startups that sell it as a do-it-yourself product.

The industry as a whole is very young. It supports these three camps right now because the ecosystem is fractured. Businesses seeking website work have varying levels of understanding about the industry. This leads them to choose one of the three options based on criteria that may not create a good match.

Freelancers, agencies and in-house teams have the flexibility to adapt to the changing industry more easily than do-it-yourself products. They can also cater to a client’s needs.

In the future, I believe small and medium size businesses will give more credibility for freelancers and design agencies.  All large businesses will be able to justify the expense of having an in-house team.

What will cause these trends to continue? Designing, developing and managing businesses online is no longer a one-time expense.