I'm running my own standard (LAMP) server with multiple virtual hosting sites on it.

Whenever I have to install a module that requires tables to be added to MySQL, I get an error:

"No such file or directory found"

Here's what I'm typing into my console:

mysql -u -username -ppassword databasename < module.sql

And it doesn't matter which module I'm trying to install.

I'm sure that it's got to be something really stupid that I'm missing. I've tried running the command as root, as user, from within the directory that the tables are located, from the root directory...nothing.

What's the problem here?

Comments

styro’s picture

will need to be run from the same directory the module.sql file is in.

Or you could do something like mysql -u -username -ppassword databasename < path/to/module.sql if you are in a different directory.

--
Anton

styro’s picture

That it is the mysql executable that can't be found. What does which mysql output?

If thats the case, you probably don't have the mysql client directory on your path.

--
Anton

VinceDee’s picture

Got it. It was the paths.

I had to type:

mysql -u username -ppassword database < /path/www/module.sql

In order for it to work I had to be in the root directory, it wouldn't work from within the /usr/bin/ directory.

Thanks for the help!

(now if I can only figure out how this im module works...)