Web Hosting Talk







View Full Version : Edit mysql commands


djacks89
12-29-2005, 10:04 PM
What is an efficent way to go back and edit a mysql command after getting an error message. Typing all the lines over again is quite tedious, especially when creating a table. There has to be a smarter way to do it. I thought it was edit, but I don't know how to use it.

rackgeek
12-29-2005, 10:12 PM
Hello,

If you're in Windows, you can use arrow keys.

On Linux, you can use arrow keys with 'mysql' Check your user directory
for a file called .mysql_history

Also, you can use the \e command to edit the previous statement.

Thank you!

Einnar

djacks89
12-30-2005, 09:49 AM
I'm using Freebsd. When I use the \e command and edit the line, what do I do next to get back to Mysql with the edited line showing and ready for me to execute the mysql command.