| 1 | [wiki:howto <- Back to the HOWTO section] |
| 2 | |
| 3 | = TODO: title = |
| 4 | |
| 5 | * Audience: Intermediate Users |
| 6 | * Requires: MacPorts >=1.9.2 |
| 7 | |
| 8 | == Introduction == |
| 9 | |
| 10 | MySQL Workbench is a nice and advanced GUI frontend to administer MySQL databases. It's basically a GUI frontend to the mysql client and as such is similiar to the phpMyAdmin web-frontend . |
| 11 | |
| 12 | The MySQL Workbench program make some assumptions as to where files are under Mac OS X - specifically the program assumes that MySQL has been installed from the *.dmg downloaded from MySQL. |
| 13 | |
| 14 | This tutorial shows how to modify the default setting to get it to recognize the MacPorts install of MySQL5 as well as giving a very basic introduction in setting up a basic configuration that the postfixadmin port can use. |
| 15 | |
| 16 | Many web-interfaces / web-services require a basic setup in the MySQL database in order to do their own configuration stuff. |
| 17 | |
| 18 | == Installation == |
| 19 | |
| 20 | === Step 1: '''Install and configure the mysql5 port''' === |
| 21 | |
| 22 | {{{ |
| 23 | port install mysql5-server # intstall mysql5 from macports |
| 24 | sudo -u _mysql mysql_install_db5 # install the default databases |
| 25 | port load mysql5 # start the mysqld server |
| 26 | ps -axj | grep mysql # check that the mysql server is running |
| 27 | /macports/lib/mysql5/bin/mysql_secure_installation # secure the default installation |
| 28 | echo '[mysqld]' >> /macports/etc/mysql5/my.cnf # create a configuration file for mysql(d) |
| 29 | chown _mysql:_mysql /macports/etc/mysql5/my.cnf |
| 30 | chmod 664 /macports/etc/mysql5/my.cnf |
| 31 | }}} |
| 32 | |
| 33 | The following are the questions asked by mysql_secure_installation and the appropriate answers |
| 34 | {{{ |
| 35 | Enter current password for root (enter for none): # just hit [enter] as the database is new |
| 36 | Set root password? [Y/n] Y # we do want the root user to have a password |
| 37 | New password: # enter at very secure password |
| 38 | Re-enter new password: |
| 39 | Remove anonymous users? [Y/n] Y # anonymous users are not wanted ! |
| 40 | Disallow root login remotely? [Y/n] Y # root can only log in from localhost |
| 41 | Remove test database and access to it? [Y/n] Y # we have no need for a test database |
| 42 | Reload privilege tables now? [Y/n] Y # make sure the above settings are applied |
| 43 | }}} |
| 44 | |
| 45 | |
| 46 | == Configuration == |
| 47 | |
| 48 | === Step 1: '''Install MySQL Workbench''' === |
| 49 | |
| 50 | Download and install the MySQL Workbench program from [http://wb.mysql.com/ MySQL Workbench] |
| 51 | |
| 52 | === Step 2: '''Modify the default settings in MySQL WorkBench''' === |
| 53 | |
| 54 | |
| 55 | == Optional Parts == |
| 56 | |
| 57 | === '''TODO: What else can be done?''' === |
| 58 | |
| 59 | [wiki:howto <- Back to the HOWTO section] |