mysql生成sql語句 and 查看mysql歷史命令 and 查看mysql歷史命令 and 解壓命令 and 安裝WPS and 啓動Oracle服務

Linux下的mysql生成sql語句
mysqldump -u root -p hibernate2 > /home/wyq/hibernate2.sql

 

查看mysql歷史命令
cat  ~/.mysql_history 即可以看到以前的命令歷史。

 

MySQL級聯刪除的修改:
show create table t_service;
 KEY `fk_service_user1` (`user_id`),
 KEY `fk_service_pricing1` (`pricing_id`),
 CONSTRAINT `service_pricing_fk` FOREIGN KEY (`pricing_id`) REFERENCES `t_pricing` (`pricing_id`) ON DELETE CASCADE,
 CONSTRAINT `service_user_fk` FOREIGN KEY (`user_id`) REFERENCES `t_user` (`user_id`) ON DELETE CASCADE


mysql> alter table t_service drop foreign key fk_service_pricing1;
Query OK, 5 rows affected (0.33 sec)
Records: 5  Duplicates: 0  Warnings: 0

mysql> alter table t_service drop foreign key fk_service_user1;
Query OK, 5 rows affected (0.50 sec)
Records: 5  Duplicates: 0  Warnings: 0


mysql> alter table t_service add constraint fk_service_user1 foreign key (user_id) references t_user(user_id) on delete cascade;
Query OK, 5 rows affected (0.34 sec)
Records: 5  Duplicates: 0  Warnings: 0

mysql> alter table t_service add constraint fk_service_pricing1 foreign key (pricing_id) references t_pricing(pricing_id) on delete cascade;
Query OK, 5 rows affected (0.33 sec)
Records: 5  Duplicates: 0  Warnings: 0

 

解壓命令:
tar -xvzf apache-tomcat-6.0.37.tar.gz

 


安裝WPS
sudo rpm -ivh wps

 

 

啓動Oracle服務
sudo /etc/init.d/oracle start


service --status-all

sudo service oracle start
[sudo] password for oracle:
oracle is not in the sudoers file.  This incident will be reported.
找路徑

/etc/init.d $ sudo service oracle start

sudo service oracle restart

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章