mysqデータベース基本管理

2597 ワード

コマンドテーブル:
1.mysqlデータベースのパスワードの設定
mysqladmin -u root password 'new-password' 'new-password'      。

 
2.mysqlデータベースへのログイン
mysql -uroot -p'new-password'

 
 
3.mysqlデータベースパスワードのリセット
mysqladmin -uroot -p     password    

 
 
4.データベースのバックアップとリストア
mysqldump -uroot -pnew-password -R      > /tmp/data.sql (  ,/tmp         ,data.sql           。) mysql -uroot -pnew-password -D      < /tmp/data.sql #  

 
 
5.データベース挿入データ
insert into    .   ('  1''  2') values ('  1','  2');

 
 
6.データベース修正データ
updeae    .    set   1='   ',  2='   ' where    =   

 
 
7.データベースデータ照会
select * from    .    where ...

 
8.データベースでサポートされているストレージエンジンとデータテーブルで使用されるエンジンクエリー
show engines;             ; show create table      ;               。

show variables like 'storage_engine'; 。

alter table engine=innodb; 。