Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot access Mysql from command line

Status
Not open for further replies.

tektippee

IS-IT--Management
Jun 15, 2008
6
US
I run MAMP 1.61 on a Mac 10.6.2.

I would like to add a new database from a
large sql file that phpMyAdmin cannot handle.
But when I type into the Mac's terminal
"mysql" - it does not find this command.

I used "cd" to go to:
me/applications/MAMP/Library/bin
where I see many mysql command files - but still
"mysql" yields "command not found".

And by the way, can you also show me what
command I would use to upload this file
to a new database called "newdb"?
 
Once you find and can access mysql,
mysql> create database newdb;
mysql> \. /path/to/file.sql

mysql should start reading the file and loading it, provided the create info is also in the file.

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
I'm not too familiar with Macs, but I'd try


locate mysql
cd whereveritwasfound
./mysql

-----------------------------------------
I cannot be bought. Find leasing information at
 
does it have an extention on MAC's like .exe on windows ?.
Probabby a stupid question as it's realy UNIX I believe.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top