Why does " ^C " appear on putty and makes me write the mysql code again? - mysql

As you see, the first time I wrote the code, the ^C appeared. Then I had to write exactly the same again and then everything worked completely fine. What is wrong?

^Cis the command to end a process running in the CMD
https://learn.microsoft.com/en-us/windows/console/ctrl-c-and-ctrl-break-signals

Whenever you will use Ctrl + c while using terminal or command prompt, control return will occur.

Related

How would I make batch code running in a command prompt window unclosable?

I'm looking to make a file that when running it constantly kills chrome so you cannot run it (this is just for fun) and I'm trying to make it so it is not possible to just close it by hitting the X button
Would it be possible?
cls
:kill
taskkill /IM chrome.exe
goto kill
Well Windows command prompt don't let you do that.
However another languages like Python can do that.

OS X: Keep commands working in terminal

when I try to use mysql or mysqldump command in terminal I receive an error saying mysql: command not found. Ok the next step is to add the path of mysql: something like this export PATH=$PATH:/usr/local/mysql-5.7.15-osx10.11-x86_64/bin. After that I can use both commands without problem, but if I close the Terminal or restart the computer the mysql/mysqldump command is not recognised by the terminal again. Do you know what could be happening?
I'm using OS X Sierra
Add the below line to .bash_profile for the changes to take effect on every new shell on your OS X system. Not doing so, leaves the changes only on your current working shell and the changes are lost at the end of the shell exit.
export PATH=$PATH:/usr/local/mysql-5.7.15-osx10.11-x86_64/bin
.bash_profile is read at start-up of every new session, so that now the shell knows which path it should pick up the mysql executable.
On macOS you can always add it to /etc/paths.d by creating a file there called something like 90-mysql with the content:
/usr/local/mysql-5.7.15-osx10.11-x86_64/bin
That will apply to new shells, so you will need to create a new terminal window for that to take effect.
The other option is to create a link in /usr/bin to whatever binaries in that directory you want to use. That's more of a hack and probably less elegant than the paths.d option.

launching putty from browser also opens up cmd.exe

I was trying to launch PUTTY from web browser while, I was able to achieve this after reading this post " http://johnsofteng.wordpress.com/2009/05/12/launch-putty-from-browser/ " but when i click on any ssh:// link both command prompt(cmd.exe) and putty.exe are opening up.I do not want command prompt(cmd.exe) to openup instead only putty.exe should launch.
The command window runs you batch file, you can achieve what you want with the following:
add start (https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/start.mspx?mfr=true) to the batch file call to start putty, ie:
start /b "C:\Program Files\PuTTY\putty.exe" %extract%
this allows the batch file to close once putty has launched, rather than waiting for it to exit.
To prevent the command window appearing in the first place take a look at this answer https://superuser.com/a/443181 and the thread it is in in general
Use this:
CD C:\Program Files\PuTTY
start putty.exe %extract%
exit
instead of :
"C:\Program Files\PUTTY\putty.exe" %extract% exit

How to start new process in terminal without kill the one which still running

ex. when i open google-chrome through terminal i can't write command lines anymore, is there a way to start new command line in same terminal window without closing chrome ?
use the & to put the process in the background. e.g.:
open google-chrome &
Or just open another terminal window and run your command

Code::Blocks - warnings disappear when running program

I'm using Code::Blocks 10.05 (currently on Windows).
When I run the program (Ctrl + F10), all the warnings in the build log disappear, so the first line is "Checking for existence...".
So when I build & run (F9), it's not possible to read the warnings, because they're only visible for a few seconds.
Where is the setting to change that?
Just simply use the Build command for your project without running it. Shortcut for this is Ctrl + F9. That way you get to keep your build log.