Linux under
are operated under the console.
To import a database:
Prerequisite: Database and datasheet to exist (already created)
(1) Import the datasheet test_user.sql into the Test_user table of the test database
[Root@test ~]# mysql-uroot-p Test </www/web/test/test_user.sql
(2) Import database Test.sql into test database test
[Root@test ~]# mysql-uroot-p Test </www/web/test/test.sql
(3) Source command is not under the console, to enter the operation under MySQL
mysql> use test;
Mysql>source/www/web/test/test.sql
To export a database:
(1) Export database test to/www/web/test/test.sql
[root@test ~]# mysqldump-uroot-p Test >/www/web/test/test.sql
Prompt for password when entering a carriage
(2) Export the User data table in the database test to/www/web/test/user.sql
[Root@test ~]# mysqldump-uroot-p test User </www/web/test/user.sql