Hexana
Hexana

Reputation: 1135

Copy my.cnf file to Mysql Directory with Command Line

I am trying to copy a new my.cnf to my mysql5 directory in the command line. I have used:

cp my.cnf /opt/local/etc/mysql5

However when I execute the command, I get Permission Denied.

I am the directory where my.cnf resides.

Thanks for your help.

Upvotes: 0

Views: 775

Answers (1)

omeganebula
omeganebula

Reputation: 180

You are trying to copy the file to root user's directory. You'll need to use sudo.

Try

$ sudo cp my.cnf /opt/local/etc/mysql5

Upvotes: 1

Related Questions