Skip to content

Commit d5880f3

Browse files
committed
Add mysql
1 parent 35757f8 commit d5880f3

File tree

1 file changed

+46
-3
lines changed

1 file changed

+46
-3
lines changed

README.md

+46-3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ The document assumes you are new to Mac. The steps below were tested on **OS X M
1717
- [Virtualenv](#virtualenv)
1818
- [IPython](#ipython)
1919
- [Numpy and Scipy](#numpy-and-scipy)
20+
- [MySQL](#mysql)
2021
- [Projects folder](#projects-folder)
2122

2223
## System update
@@ -378,7 +379,6 @@ The [Numpy](http://numpy.scipy.org/) and [Scipy](http://www.scipy.org/SciPy) sci
378379

379380
First, grab the special formulae (which are not part of Homebrew core):
380381

381-
$ brew update # Always good to do
382382
$ brew tap samueljohn/python
383383

384384
Then, install the `gfortran` dependency which we will need to build the libraries:
@@ -390,15 +390,58 @@ Finally, you can install Numpy and Scipy with:
390390
$ brew install numpy
391391
$ brew install scipy
392392

393-
(It make take a few minutes to build.)
393+
(It may take a few minutes to build.)
394+
395+
## MySQL
396+
397+
### Install
398+
399+
We will install [MySQL](http://www.mysql.com/) using Homebrew, which will also install some header files needed for MySQL bindings in different programming languages (MySQL-Python for one).
400+
401+
To install, run:
402+
403+
$ brew update # Always good to do
404+
$ brew install mysql
405+
406+
As you can see in the ouput from Homebrew, before we can use MySQL we first need to set it up with:
407+
408+
$ unset TMPDIR
409+
$ mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
410+
411+
### Usage
412+
413+
To start the MySQL server, use the `mysql.server` tool:
414+
415+
$ mysql.server start
416+
417+
To stop it when you are done, run:
418+
419+
$ mysql.server stop
420+
421+
You can see the different commands available for `mysql.server` with:
422+
423+
$ mysql.server --help
424+
425+
To connect with the command-line client, run:
426+
427+
$ mysql -uroot
428+
429+
(Use `exit` to quit the MySQL shell.)
430+
431+
**Note**: By default, the MySQL user `root` has no password. It doesn't really matter for a local development database. If you wish to change it though, you can use `$ mysqladmin -u root password 'new-password'`.
432+
433+
### MySQL Workbench
434+
435+
In terms of a GUI client for MySQL, I'm used to the official and free [MySQL Workbench](http://www.mysql.com/products/workbench/). But feel free to use whichever you prefer.
436+
437+
You can find the MySQL Workbench download [here](http://www.mysql.com/downloads/workbench/). (**Note**: It will ask you to sign in, you don't need to, just click on "No thanks, just start my download!" at the bottom.)
394438

395439
## Projects folder
396440

397441
This really depends on how you want to organize your files, but I like to put all my version-controlled projects in `~/Projects`. Other documents I may have, or things not yet under version control, I like to put in `~/Dropbox` (if you have Dropbox installed), or `~/Documents`.
398442

399443
## Todo
400444

401-
- MySQL
402445
- Node
403446
- Ruby
404447
- Apps

0 commit comments

Comments
 (0)