标签:varchar 预编译 条件 dex mit use like alt limit
预编译二进制包
groupadd --gid 666 --system mysql
useradd --uid 666 --gid mysql --system mysql
ln -sv mariadb-VERSION-OS mysql
chown --recursive --dereference -L root.mysql mysql
mkdir -pv /mysql/data && chown --recursive mysql.mysql /mysql
./scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/mysql/data
cp support-files/my-huge.cnf /etc/my.cnf
datadir=/mysql/data
basedir=/usr/local/mysql
skip-name-resolve=on
innodb-file-per-table=on
cp support-files/mysql.service /etc/rc.d/mysqld
输出头文件
ln -sv /usr/local/mysql/include/mysql /usr/include/mysql
输出库文件
echo ‘/usr/local/mysql/lib‘ > /etc/ld.so.conf.d/mysql.conf
ldconfig -v
grant all on wpdb.* to assert@‘localhost‘ identified by ‘assert‘;
grant all on wpdb.* to assert@‘127.0.0.1‘ identified by ‘assert‘;
flush privileges;
set password for root@‘%‘=password(‘assert‘);
status
show table status like assert;
create table gutter (id unsigned not null,name varchar(20) not null, age tinyint unsigned, primary key (id,name));
alter table gutter add gender enum(‘m‘,‘f‘) after name;
alter table gutter add gender enum(‘m‘,‘f‘) first;
alter table gutter drop gender;
alter table gutter change id sid int unsigned not null;
alter table gutter add unique key (name);
alter table gutter add index (age);
show indexes from gutter;
alter table typo drop index age;
索引是特殊的数据结构,定义在做为查找条件的字段上
create index index_name on table (field);
drop index index_name on table;
insert into typo (sid,age,name) values (1,10,‘ppp‘),(2,20,‘zzz‘);
insert into typo set sid=4,name=‘zzzz‘;
delete from typo order by sid desc limit 1;
update typo set age=88,gender=‘f‘ where sid=4;
select current_user();
show privileges;
show grants for ‘user‘@‘host‘;
show grants for current_user();
grant all on *.* to ‘user‘@‘host‘ identified by with grant option;
标签:varchar 预编译 条件 dex mit use like alt limit
原文地址:https://www.cnblogs.com/dissipate/p/13264587.html