Mysql workbench browser
  1. Install MySQL via command prompt. For Mac: $ brew install mysql. For Ubuntu: $ sudo apt-get install mysql-server. After installing MySQL, we can access it through below command. $ mysql -u root. Provide MySQL details (username and password) to connect to local mysql. The default password is blank.
  2. At the time of this writing, the default version of MySQL in Homebrew is 8.0. We can check this by running brew info mysql. However, we’re aiming to install version 5.7 so let's.
  3. With WORKBENCH, connect to an external database (on OVH with phpmyadmin) So, I'm trying to connect to my database. I'm trying to do it with workbench. I put the password of the database after clicked on 'ok'. I also tried to put lereseq995.mysql.db instead of Hostname: 127.0.0.1. So, if someone can help me please.

There are many ways to install PHP, MySQL & Nginx on Mac. Here we will be doing it using brew.

Installing PHP 5.4 (with FPM) on Mac OS X

Search for available PHP formulas (formula’s in homebrews are equivalent to packages in aptitude)

I installed MySQL server and client using brew. I installed MySQL Workbench with brew cask, but I don't find MySQL Utilities (something new?). How to install that using brew or brew cask? MySQL Workbench for macOS is distributed as a DMG file. The file is named mysql-workbench-community-version-osx.dmg, where version is the MySQL Workbench version. MySQL Workbench provides platform support for the latest version of macOS only (see supported platforms). The previous version continues to be supported for a transition period of six.

It will return long list of php 5.2, 5.3, 5.4 packages. We need 5.4. Tap it using:

If you do not tap homebrew/dupes you will get Error: No available formula for zlib

Before we build PHP 5.4, you may like to exercise options using:

We have built it using:

After long wait, you can verify php & php-fpm version using php -v and php-fpm -v respectively.

Adding PHP-FPM to startup routine

Please check exact plist filename in /usr/local/Cellar/php54/

To Start PHP-FPM:

Mysql workbench browse tables

To Stop PHP-FPM

Installing MySQL on Mac OS X

Run following command:

In case you need mysql-workbench, please download it from here. It cannot be installed via brew.

Adding MySQL to startup routine

Please check exact plist filename in /usr/local/Cellar/mysql/

To Start

To Stop

Manual Start/Stop

Start mysql: /usr/local/mysql/support-files/mysql.server start

Stop mysql: /usr/local/mysql/support-files/mysql.server stop

See other options – /usr/local/mysql/support-files/mysql.server -h

Changes to MySQL Config (optional)

For security

Run following command to improve security of your mysql setup. It will present you wizard to set mysql root password among other things.

For workbench

Following changes will make it easy to use MySQL WorkBench

Installing Nginx on Mac OS X

Run following command:

Adding Nginx to startup routine

Please check exact plist filename in /usr/local/Cellar/mysql/

To Start

To Stop

Changes to Nginx Config (optional)

By default, Nginx setup expects you to define all virtual hosts in /usr/local/etc/nginx/nginx.conf

Edit default config file and following line to http{..} block

Next you can create sites-available and sites-enabled folder to manage virtual hosts config.

Troubleshooting

Finding default location of config/error files for PHP, MySQL & Nginx

I did not get any error but after getting used to Ubuntu-conventions, I struggled to find where are config/log files and other defaults are present.

3 commands below turned out to be life-saver:

  • brew list nginx
  • brew list php54
  • brew list mysql

Brew’s list command shows all files/folders created by a package. Once you see output, you will notice, why I was getting lost!

If you come across any other error, feel free to use our support forum. We will try to fix it there.

Brew Mysql Workbench

Next: Install WordPress

Welcome back to another SecuringNinja tutorial. No cyber security researcher should be with out a database to practice their skills on, or just to store tons of relational data. Today we will show you how to install MySQL on a Mac. Having a local database is perfect for running websites locally, or for providing persistent storage for another application.

In this article we cover how to:

MySQL is very straight forward to install on a Mac. If you do not already have the Homebrew package manager for Mac you’ll need to install that first. If you would rather not install Homebrew you can also install MySQL using the DMG file available on the MySQL site.

Installing Homebrew on Mac

Lets start by opening up Terminal and installing Homebrew. Homebrew is a macOS package manager that makes installing packages on macOS a breeze.

To install Homebrew on Mac run the following command:

Once the install is complete go ahead and run an update to test that everything is working correctly.

With Homebrew installed it is a simple matter to install MySQL.

Installing MySQL on Mac with Brew

Mysql

Installing MySQL with Brew is a breeze. All it takes is:

This will install the most recent version of the package available on Brew. As of this writing it is MySQL version 8.0. To install a different version simply append the version to the end of the package with an @ symbol. For example, to install MySQL 5.7 use:

If you don’t want to install Homebrew you can also install MySQL with the DMG file available for download as described below.

Installing MySQL with a DMG file

You can also install MySQL via the DMG file on the MySQL downloads page. This will add a MySQL preference pane in System Preferences as well. You can start and stop your server from here too.

First begin by downloading and mounting the DMG file available from the MySQL Community downloads page. Make sure you grab the appropriate DMG for your OS version.

Mount the DMG and double click the .pkg file to begin the installation.

Step through the installer installer and make a note of your temporary root password. You will need this for the initial connection to the server. DO NOT LOSE IT!

The server will require that you update your password on the first login. MySQL server is now installed. To start the server use launchctl or the MySQL preference pane in System Preferences. The server uses very few resources while running in the background so there really is no need to start and stop the server each time.

To start the server via launchctl:

This instructs MySQL to start when the system boots up.

Mysql Workbench Brewing

You can also start and stop MySQL through the System Preferences pane. Open System Preferences and select MySQL:

And finally, start or stop the server as needed.

From this preference pane you can also edit the MySQL server configuration, re-initialize the database, and uninstall MySQL server entirely. We cover how to uninstall MySQL on Mac in the next section.

Uninstalling MySQL on Mac

If you installed MySQL via the DMG file method then uninstalling is extremely straight forward. Navigate to the MySQL preference pane in System Preferences, and click Uninstall. Thats it! MySQL has been uninstalled.

If you however installed MySQL using the Brew method described above, then there are a couple of extra steps.

Workbench

Mysql Workbench Browser

Uninstalling MySQL on Mac with Brew

Mysql Workbench Benefits

The steps below show how to uninstall MySQL installed with Brew. Begin by finding any running MySQL processes and stopping them. Then uninstall MySQL and remove all files.

Mysql Workbench Brew Maker

What to do with your new database

Mysql Workbench Download

Now that you’ve got a local database up and running you may want to take a look at how a SQL injection attack works. Your new database will be great for practice! If you have any issues getting your database up and running, please reach out in the comments below. We would love to assist you!