-1

I am trying to install cacti. When I want to import mysql_test_data_timezone.sql to MySQL database on Linux CentOS, I get an error.

My command is

mysql -u root -p mysql < /usr/share/mysql/mysql_test_data_timezone.sql

I get error

No such a file or directory ;

Does this directory have to exist or do I have to create it myself?

  • Is there some reason there is a . at the end of the filename? The command should be mysql -u root -p mysql < /usr/share/mysql/mysql_test_data_timezone.sql. – Nasir Riley May 18 '19 at 21:47
  • No .İ did not write '.' .When I ask question ,I added it by mistake . – Cebrayil May 19 '19 at 4:54
2

Later versions of CentOS install mariadb-server in preference to mysql server. You can list the files installed by mariadb-server using the rpm utility

rpm -ql mariadb-server

you can then examine the output to see if the file you are looking for is installed (hint: it is, under a different path).

If you do not know which package (if any) provides a particular file you can use yum to search for it e.g.

yum provides /usr/share/mysql/mysql_test_data_timezone.sql

or to search more generally

yum provides */mysql_test_data_timezone.sql
| improve this answer | |
  • Thank you a lot) I provide particular file as you say and works – Cebrayil May 19 '19 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.