PDA

View Full Version : mysql: command not found


BfB
12-28-2003, 01:38 AM
I'm fairly new to freeBSD and what not. I have played around with the unix command line before. I've been trying to run the mysql command to reload a sql dump, I've tried it in the dir of the sql dump and the dir with the mysql/mysqldump commands. No matter what I try this is what I get

-bash: mysql: command not found

Help please

filburt1
12-28-2003, 01:54 AM
It means mysql is not in the path. Try:

locate mysql

I think it's in /usr/local/mysql/bin .

BfB
12-28-2003, 01:59 AM
if I run that command it finds alooooot of matches, so i try locate "mysqldump" to get a shorter list ( /usr/local/psa/mysql/bin ) and i make that the working directory, and run the "mysql -u username -p dbnam < /usr/local/........./*.sql

and it still comes back with "mysql: command not found"

filburt1
12-28-2003, 02:26 AM
Try ./mysql when you're in the directory.

BfB
12-28-2003, 02:29 AM
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)

filburt1
12-28-2003, 02:54 AM
At this point, it's a MySQL issue rather than a shell issue. Make sure that you are connecting to MySQL as a valid user. When in doubt, see what your config.php is using.

BfB
12-28-2003, 02:55 AM
I have a valid mysql user setup, but I cannot log into the shell with that login. Right now I am testing moving boards so the config.php is not edited yet.

filburt1
12-28-2003, 02:59 AM
Are you using ./mysql -uusername -p dbname, then entering the proper password when asked?

BfB
12-28-2003, 03:05 AM
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 998 to server version: 3.23.56

btw .... thank you for your help!

BfB
12-28-2003, 03:10 AM
just for the hell of it I did the ./ before the command to run the dump, it worked great .....

whats the "./" for just so I know for future reference