Jump to content

Navigating Mysql In The Command Line Utility


skaterdav85

Recommended Posts

This probably and ultra newbie thing to ask, but how do I get to mysql in the CLU? I open up the CLU and i start off in my H drive, but my installation of XAMPP is in my C drive. I tried cd ../ but that doesnt work. So first, how do I get to my C drive, and then after that, what exactly do I do to get to MySQL?

Link to comment
Share on other sites

H:\>C:C:\>cd path\to\mysql\binariesC:\path\to\mysql\binaries>mysql.exe -uusername -ppassword

You can use cd .. to go up one directory.

Link to comment
Share on other sites

So I got to here:

C:\xampp\mysql\bin

and i want to execute mysql.exe. How do I do that? I tried doing ls -al, but that wouldn't list anything. And I tried doing cd mysql.exe since I know it's in that folder but that doesnt work either.

Link to comment
Share on other sites

cd is to change the directory. ls is a Linux command. If you want to list files in Windows, you use dir. Look for a DOS command reference, that should answer most of your questions. If you want to run a file you just type the name of the file. If it's an executable you don't need the extension on the end.

Link to comment
Share on other sites

cd is to change the directory. ls is a Linux command. If you want to list files in Windows, you use dir. Look for a DOS command reference, that should answer most of your questions. If you want to run a file you just type the name of the file. If it's an executable you don't need the extension on the end.
is cd a Linux command or a Unix command? I thought when you go to cmd, you just navigate your computer using unix commands?
Link to comment
Share on other sites

You use Unix commands on a Unix machine, Linux commands on a Linux machine, and Windows commands on a Windows machine. Each shell typically uses "cd" to change the directory. Most commands are different between the shells though, the delete command for a Linux machine is rm, but for Windows it's del.

Link to comment
Share on other sites

So I finally created a stored procedure. What happens if you have a lot of them. How can you view all your SP's?I tried this based on what the mysql site said here, but it didnt work.table=customerinfodb=customers

SELECT ROUTINE_TYPE, ROUTINE_NAME	FROM customerinfo	WHERE ROUTINE_SCHEMA='customers';

i get an error that says:Unknown column 'ROUTINE_TYPE' in 'field list'

Link to comment
Share on other sites

Linux (unofficially) follows the Single Unix Specification (SUS), which means (among other things) that it implements all Unix commands.

Link to comment
Share on other sites

I tried this based on what the mysql site said here, but it didnt work.table=customerinfodb=customersCODESELECT ROUTINE_TYPE, ROUTINE_NAME FROM customerinfo WHERE ROUTINE_SCHEMA='customers';i get an error that says:Unknown column 'ROUTINE_TYPE' in 'field list'
Check the link, you're not supposed to select from one of your tables, it's a system table that holds that information.
Link to comment
Share on other sites

oh ok. thanks, yup, that worked!Also, has anyone had any experience using Terminal and MAMP? I cant see to access my MySQL server through terminal. Im guessing it's because its packaged into MAMP.i tried doing:/Applications/MAMP/Library/bin/mysql -uroot -pbut that didnt work. I was going off this site here

Link to comment
Share on other sites

Is the binary in the location you typed? What was the error message?You can explore the contents of applications by bringing up the context menu for them and selecting "view contents".

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...