FB Posted July 29, 2007 Share Posted July 29, 2007 HI I got the xampp for local testing with mysql, php and apache etc. I am new o this so bear with me please. Everything is fine apart from my sql in it. I have to "The first step is to create the database file. Start the mySQL client and type the following command: mysql> create database guestdb; Query OK, 1 row affected (0.00 sec) mysql>" But when I open xampp and mysql in xampp, there is no where to put this. Do I have to set up server info etc first? Any tipos would be great as I just cant work it out. I have studied the faq in xampp and cant find the answer. I just want to start my first database lol :'( Thank you Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 29, 2007 Share Posted July 29, 2007 You need to open the Windows Command Line (Start > Run > Type in cmd and then press OK. You should get a small black screen that reads out this: <Windows Version Here> <Copyright Information> C:\Documents and Settings\[YOUR_WINDOWS_USERNAME]> _ Now type in the following command: cd C:\Program Files\XAMPP\mysql\bin and press enter. NOTE: Change Change C:\Program Files\XAMPP to the path in which you installed XAMPP to, if you installed XAMPP in a different location than the default install path. You should now get a line that reads: C:\Program Files\XAMPP\mysql\bin> _ This now means you are in the bin folder for mysql. Now type in the following command: mysql -u root Press Enter. This will log you in as the default root user. root is a default user that is setup when MySQL is installed. If you have setup a password for the root user via XAMPP you will havve to run the following command instead to login to MySQL: mysql -u root -p Press enter and then type in your password when prompt followed by enter. You should now be shown a message that starts with Welcome to the MySQL Monitor and the command has changed to: mysql> _ You are now logged into the MySQL Server and you can now run you mysql queries. To logout of MySQL just type exit; and you'll be returned back to the Windows Command Line Quote Link to comment Share on other sites More sharing options...
tippy_102 Posted July 29, 2007 Share Posted July 29, 2007 I use xampp and what I do is open phpMySql in a browser: http://localhost/phpmyadmin/ Then in the "Create new database" box, type the name of the database and hit "Create" Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted July 29, 2007 Share Posted July 29, 2007 Well yeah, that works if you installed phpMyAdmin, or took the easy option(which i did) and installed WAMP which does that for you Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.