Jump to content

[SOLVED] xampp help for mysql - anyone know xampp well?


FB

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.