XAMPP includes PHP, MySQL, phpMyAdmin and several other handy programming languages which help setup your own server (and even webserver). phpMyAdmin makes it really easy to configure and manage databases, tables and relations.
There is also a specific version for Mac too which is slightly more lightweight:
You can also use MySQL Workbench to help you design your database, create ER diagrams, and also reverse AND forward engineer your databases to/from models. MySQL Workbench also helps *a lot* if you are trying to add Foreign Keys to your database - but using phpMyAdmin works fine too.
How to setup Foreign Keys using phpMyAdmin: http://www.learnphp.org/tutorials/Setting-Up-Foreign-Keys-Using-PhpMyAdmin-63466.html
MySQL Workbench: http://wb.mysql.com/
However, if you would rather just install MySQL Server, here are some instructions I've put together which may help you set it up too.
Download MySQL Server: http://dev.mysql.com/downloads/mysql/
If you have made a database in phpMyAdmin and want to set it up just on MySQL, here are the instructions on how to import it back.
To use a newer version of the database, delete the existing database:
mysql> drop mydb;
Import newer version:
CREATE DATABASE mydb;
USE mybd;
\. C:\mydb.sql (this is the path to your exported SQL file)
More MySQL Commands: http://www.pantz.org/software/mysql/mysqlcommands.html
If you have trouble logging onto MySQL and need to reset your password: http://lists.mysql.com/mysql/171366
Follow these instructions better:
- Manual stop: go to run, type services.msc; find the service name, right-click it and click Stop.
- Go into C:/Program Files/MySQL/MySQL Server 5.1/bin/
- Right-click the mysqld.exe file and create shortcut
- Right-click the shortcut, go to properties, and in the path, add on the end (don’t need quotes): --skip-grant-tables
- In MySQL command line prompt issue the following command:
- mysql –u root mysql
- UPDATE user SET password=PASSWORD("abcd") WHERE user="root";
- FLUSH PRIVILEGES;
- At this time your root password is reset to "abcd" and MySQL will now know the privileges and you'll be able to login with your new password:
- mysql –u root –p abcd mysql
Importing the database:
http://eyaddoush.blogspot.com/2008/04/how-to-import-sql-dump-file-into-mysql.html
To test your databases have been imported:
mysql> show databases;
mysql> USE mydb;
Alternatives to XAMPP:
http://www.easyphp.org/index.php
http://www.appservnetwork.com/