启动mysql服务
service mysql start
进入mysql的操作:
linux-ho03:/home/snsh/data # mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.4.3-beta-community-log MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
但是用mysqldump命令导入导出数据文件是Linux的命令,不是mysql的命令,不需要进入mysql.
linux-ho03:~ # mysqldump -u root -p snrepdb > /data/backup.sql;
Enter password:
linux-ho03:~ #
导入导出的几个方法: