simple MySQL question

Alles, was MariaDB und MySQL betrifft, kann hier besprochen werden.

simple MySQL question

Postby Dalai » 09. December 2011 18:07

I've installed XAMPP latest version and run MySQL as follows ...

mysql> -u root

when I hit return I get

->

can anyone help?
Dalai
 
Posts: 5
Joined: 09. December 2011 17:56
Operating System: Win7

Re: simplw MySQL question

Postby Altrea » 09. December 2011 18:53

What is your question?
mysql started right after you start \xampp\mysql\bin\mysqld in your command line.

But the recommend method starting MySQL is to start the XAMPP control panel and hit the start button.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: simplw MySQL question

Postby Dalai » 09. December 2011 19:08

I know I'm doing something wrong but don't understand.

on my xampp control panel it has

MySQL running stop
Dalai
 
Posts: 5
Joined: 09. December 2011 17:56
Operating System: Win7

Re: simplw MySQL question

Postby Dalai » 09. December 2011 19:15

I expected "Welcome to ..."

not

->
Dalai
 
Posts: 5
Joined: 09. December 2011 17:56
Operating System: Win7

Re: simplw MySQL question

Postby Dalai » 09. December 2011 19:21

if I navigate cmd to \xampp\mysql\bin

and enter

mqsql -u root

then I get "Welcome ..."

but if I enter mysql and then later enter -u root then I get

->
Dalai
 
Posts: 5
Joined: 09. December 2011 17:56
Operating System: Win7

Re: simplw MySQL question

Postby Altrea » 09. December 2011 19:45

Dalai wrote:I know I'm doing something wrong but don't understand.

I don't have any idea what you are trying to do :D

Dalai wrote:on my xampp control panel it has

MySQL running stop

Thats good. MySQL is running. What do you want to do now?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: simple MySQL question

Postby Knight1 » 10. December 2011 09:49

Smiple Answer for a smiple Question: Complete the MySQL-Statement with a ; and you will get your normal Prompt back after pressing the Return-Key on your Keyboard.

Why changing the User when you are allready logged in to the MySQL-Server?

What is your intention of using MySQL? Discribe this please with a bit more details.

Kai aka Knight1
Image
User avatar
Knight1
 
Posts: 310
Joined: 18. October 2003 10:03
Location: Trier
Operating System: Windows 7 Ultimate x64

Re: simple MySQL question

Postby Sharley » 10. December 2011 10:38

Kai, would you be so kind as to add your XAMPP version and Operating System to your profile:
viewtopic.php?f=7&t=48626
Thanks kindly. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: simple MySQL question

Postby Knight1 » 10. December 2011 11:12

Sorry to you when I'm saying this but I don't use XAMPP anymore. I am running Apache, PHP and MySQL standalone on a Linux-Mashine.
It's years ago that I was using XAMPP. I even don't know anymore wich Version the last was I did used.

Sorry für Euch wenn ich das jetzt sage aber ich nutze XAMPP nicht mehr. Ich habe den Apache, PHP und MySQL als Standalone auf einer Linux-Maschine laufen.
Ich nutze XAMPP schon seit Jahren nicht mehr. Ich weiß sogar nicht mehr welche die letzte Verion war ich mal benutzt habe.


Kai aka Knight1
Image
User avatar
Knight1
 
Posts: 310
Joined: 18. October 2003 10:03
Location: Trier
Operating System: Windows 7 Ultimate x64

Re: simple MySQL question

Postby Sharley » 10. December 2011 11:23

Kai, not a problem and thanks for the feedback.

Thanks also for still supporting and contributing to the Apache Friends forums. 8)

Best wishes. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: simple MySQL question

Postby Dalai » 11. December 2011 14:57

sorry for the confusion. my question should have been ...

after installing XAMPP what is the correct way to run and connect to MySql?

if I navigate cmd to \xampp\mysql\bin

and enter

mqsql -u root

then I get "Welcome ..." which is fine

but if I navigate cmd to \xampp\mysql\bin

and enter

mqsql

and then enter

-u root

then I get

->
Dalai
 
Posts: 5
Joined: 09. December 2011 17:56
Operating System: Win7

Re: simple MySQL question

Postby Altrea » 11. December 2011 20:13

Dalai wrote:and enter
mqsql -u root

mqsql shouldn't bring you anywhere :)

Dalai wrote:what is the correct way to run ... MySql?

- The recommend way to start MySQL is with the Start Button in your XAMPP control panel.
- you can start MySQL as Windows Service, too.
- you can use the C:\xampp\mysql_start.bat file
- Or you can start MySQL in the command line - with custom parameters or the parameters the .bat file uses too:
Code: Select all
C:\xampp\mysql\bin>mysqld --defaults-file=mysql\bin\my.ini --standalone --console

You see, there are several ways to "run" MySQL. Use the one you are comfortable with and which does what you want.

Dalai wrote:... to connect to MySql?

connect can be anything. If you want to administrate, there are again several ways:
- The recommend way is to start Apache too and use http://localhost/phpmyadmin/
- you can connect in the command line, like you are trying. For this, MySQL has to run already and you have to give the credentials with your mysql command, not after! Otherwise MySQL will connect you as anonymous user.
- You can use Database Tools like MySQL Workbench

Again use the method you are comfortable with.

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64


Return to MariaDB - MySQL

Who is online

Users browsing this forum: No registered users and 4 guests