SQL Queries

Problems with the Windows version of XAMPP, questions, comments, and anything related.

SQL Queries

Postby ippo » 21. June 2011 14:51

Hi
I am not totally new to XAMPP but I never tried running SQL queries through XAMPP control panel or in any other way.
Now I have installed xampp through XAMPP 1.7.4 VC6 installer . Can anyone please tell me the different ways I can run SQL queries ?
Will be greatly obliged.
Also if anyone can explain to me the function/use of the Admin ,Shell ,SCM and other buttons in XAMPP control panel.
And what is the full form of SCM? These things are unclear to me till date. :roll:
Thanks in advance.
ippo
 
Posts: 15
Joined: 21. June 2011 14:39

Re: SQL Queries

Postby JonB » 21. June 2011 16:25

We understand you want to get help and I will deal with ONE of your questions - the ONE in the Topic.
Please make a topic for each SEPARATE query - it makes it virtually impossible for anyone using search to find answers otherwise.

Ok your answers -

there are a couple of ways to make SQL queries in XAMPP - the thing I don't know is how you want your output.

A - 'most SQL standard method' - CMD line queries with the mySQL monitor/ the program mysql.exe is effectively a MySQL shell for windows, you will get a mysql > prompt.

Start the MySQL service

open a Command Window at c:\xampp\mysql\bin

c:\xampp\mysql\bin>mysql -u 'root' -p 'yourrootpassword' (press enter)

mysql > (is what you will see when it starts)

now you can enter SQL commands. such as "show databases;" (no quote marks obviously - and it has to be correct SQL syntax, commands end with the semicolon ";") once you switch to the right database, you can enter queries!

B. 'more options with phpMyAdmin'
phpMyAdmin was designed with PHP amd MySQL in mind. IT has a complete database administration tool and a place to build and save/export queries (and create the PHP code for them) . There's even a tab called SQL!!!

http://localhost/phpmyadmin

C. 'more even betterer"
MySQL has a free developer's package 'MySQL Workbench' its a full GUI SQL toolkit with visual database design and testing in mind. (its what I use to architect new databases) its a downloaded executable that installs and runs on your machine. (again, you will need to start the MySQL service before you can run MySQL Workbench)

http://wb.mysql.com/

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: SQL Queries

Postby ippo » 21. June 2011 16:59

I wanted to know how to open the command window.pls explain in details as i am a complete noob.
Where to click in which folder as I always install XAMPP in a different directory than the system drive(C drive is my system drive and I drive is my USB hard drive where i install xampp)
ippo
 
Posts: 15
Joined: 21. June 2011 14:39

Re: SQL Queries

Postby JonB » 21. June 2011 17:24

I gave you that exact answer - how to start the MySQL monitor (mySQL Shell) did you not read it??? :?:

A - 'most SQL standard method' - CMD line queries with the mySQL monitor/ the program mysql.exe is effectively a MySQL shell for windows, you will get a mysql > prompt.

Start the MySQL service

open a Command Window at c:\xampp\mysql\bin (or whatever folder xampp\mysql\bin is)

driveletter:\xampp\mysql\bin>mysql -u 'root' -p 'yourrootpassword' (press enter)

mysql > (is what you will see when it starts)


My advice:

Breathe deep, take a chill pill, relax for a bit - then re-install - it will probably go better.

:shock:
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 121 guests