First Steps in MySQL 14.12.2009 Starting MySQL in the Computer Science CIP-Pool Open a terminal window („Anwendungen“ → „Zubehör“ → „Terminal“) Start MySQL as user „root“ (no password necessary). mysql –u root Downloading MySQL Go to the MySQL download page: http://dev.mysql.com/downloads/mysql/5.1.html Click on „Downloads“ in the left column. Scroll down to choose the version most suitable for you. (Windows: WinEssentials is sufficient.) and click on „Pick a Mirror“. You do not have to register. Just click on „No thanks, just take me to the downloads“ on the bottom of the page. Installing MySQL on a Windows machine Open the package mysql-essential-XXXXX.msi Choose „Standard Configuration“. Make the selections as below and choose a root password. Starting MySQL for the first time on a Windows machine Open the MySQL Command Line Client (Start Programs MySQL) and enter your root password. Create the database company: mysql> create database company; Download the company dump from the website of the lecture and save it in [path]. Open the Windows command line and enter: mysql company < [path]\company_dump.sql Use the company database (in MySQL): mysql> use company; Installing MySQL a Linux MySQL auf einem on Linux-Rechner machine installieren Either download the package from the MySQL download page or search for it in your repositories. Initialize the MySQL access tables (as root): mysql_install_db --user=mysql Starting MySQL for the first time on a Linux machine As root: First start the server (as root): mysqld_safe --user=mysql & Start MySQL: mysql Create the company database: mysql> CREATE DATABASE company; mysql> GRANT ALL ON company.* TO 'username'@'localhost'; Download the company dump from the lecture homepage and import it: mysql company < [path]/company_dump.sql Starting MySQL Windows: • Entry in the start menu Linux: • Start server as root: mysqld_safe –user=mysql • Start MySQL as user: mysql Questions? Martin Omasreiter: [email protected]