-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?

Cebrayil
  • 11
  • 4
  • 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 04:54

1 Answers1

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
user9517
  • 115,471
  • 20
  • 215
  • 297