mysql 练习
mysql-h192.168.137.10 -uroot-p123mysql-uroot-p123
mysqladmin -uroot -p password "redhat"
mysqladmin -uroot -predhat password "123"
grant all on*.*to zhang@"%" identified by "redhat";
mysql -uzhang-predhat
create database luzhi default character set utf8;
create database luzhi1 character set utf8;
drop database luzhi;
drop database if exists luzhi1;
create database ifnot exists luzhi444;
drop database if exists luzhi444;
use mysql;
show tables;
select * from user;
desc user;
select database();
select version();
select dayofmonth(current_date);
mysql>use mytest;
mysql> create table myclass(
-> id int(4) not null primary key auto_increment,
-> name char(20) not null,
-> sex int(3) not null default 0,
-> degree double(16,2));
mysql> insert into MyClass values(1,'Tom',96.45),(2,'Joan',82.99), (2,'Wang', 96.59);
select * from MyClass;
select * from MyClass order by id limit 0,2;
mysql> delete from MyClass where id=1;
php操作:
页:
[1]