Keyboard shortcuts for Mysql command-line window

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

Keyboard shortcuts for Mysql command-line window

Postby SH_GHAM » 25. December 2020 03:21

Hi
I am creating a basic table using Mysql terminal in command line window. I made a syntax erro
and pressed enter to go next line. Now I want to go back to the previous line to delete or edit that line.
I can not find a keyboard short cut to edit or delete that line. I select the line and do Ctrl + delete or delete but can not fix it.
Where can i find keyboard shortcut for Mysqul command-line windows?
Any help is appreciated.
SH_GHAM
 
Posts: 30
Joined: 21. December 2020 17:21
XAMPP version: 3.2.4
Operating System: Windows 10 Home version

Re: Keyboard shortcuts for Mysql command-line window

Postby Altrea » 25. December 2020 09:42

you can't. The MySQL CLI is not a text editor where you can go back a line to change that. You need to execute the whole command, will get a syntax error and can retype the command.
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: 11942
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Keyboard shortcuts for Mysql command-line window

Postby SH_GHAM » 25. December 2020 23:42

So what is the command to find the syntax error and retype it?
Thx.
SH_GHAM
 
Posts: 30
Joined: 21. December 2020 17:21
XAMPP version: 3.2.4
Operating System: Windows 10 Home version

Re: Keyboard shortcuts for Mysql command-line window

Postby Nobbie » 26. December 2020 00:05

There is no command. The Mysql Sql Interpreter does not know any edit facilities.
Nobbie
 
Posts: 13182
Joined: 09. March 2008 13:04

Re: Keyboard shortcuts for Mysql command-line window

Postby SH_GHAM » 26. December 2020 00:16

Are you saying for example while I am creating a table and make a mistake , the only way is to delete the
table and start over again?
SH_GHAM
 
Posts: 30
Joined: 21. December 2020 17:21
XAMPP version: 3.2.4
Operating System: Windows 10 Home version

Re: Keyboard shortcuts for Mysql command-line window

Postby Altrea » 26. December 2020 00:41

If the table could have created successful you can also edit the table by an ALTER Table command, or you drop the table and create it from scratch. It depends what you need to change and which method reaches the goal mor easy than the other.
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: 11942
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Keyboard shortcuts for Mysql command-line window

Postby SH_GHAM » 26. December 2020 01:57

Thank you
SH_GHAM
 
Posts: 30
Joined: 21. December 2020 17:21
XAMPP version: 3.2.4
Operating System: Windows 10 Home version

Re: Keyboard shortcuts for Mysql command-line window

Postby Nobbie » 26. December 2020 11:51

SH_GHAM wrote:Are you saying for example while I am creating a table and make a mistake , the only way is to delete the
table and start over again?


It depends, if you accidently delete lines which you did not want to delete, you cannot undo that. That is not a toy and the command line interpreter is only a tool for executing SQL commands. It does not keep a copy of all databases "just in case". Yes, you have to be carefull with SQL Databases. Keep your own backups before changing critical data.

Creating tables on the fly with the keyboard is a bad idea anyway, usually one should create text files with the SQL statements and use these files as input for the interpreter.
Nobbie
 
Posts: 13182
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 117 guests