the password is written with no spaces after p, e.g.
mysql -uroot -proot
create a user:
CREATE USER 'user'@'localhost' IDENTIFIED BY 'pass';
mysql -uroot -proot
create a user:
CREATE USER 'user'@'localhost' IDENTIFIED BY 'pass';
database management:
create database dbname;
drop database dbname;
create database dbname;
drop database dbname;
Two engines: InnoDB and MyISAM.
InnoDB (default) stores most of the data in
/var/lib/mysql/ibdata1
MyIsam stores the data in
/var/lib/mysql/dbname/
Setting is as per table.
To see the database used
use information_schema;
SELECT `TABLE_SCHEMA`,`TABLE_NAME` FROM TABLES WHERE ENGINE = 'InnoDB';
to change the storage
use dbname;
ALTER TABLE `tab` ENGINE=MyISAM;
InnoDB (default) stores most of the data in
/var/lib/mysql/ibdata1
MyIsam stores the data in
/var/lib/mysql/dbname/
Setting is as per table.
To see the database used
use information_schema;
SELECT `TABLE_SCHEMA`,`TABLE_NAME` FROM TABLES WHERE ENGINE = 'InnoDB';
to change the storage
use dbname;
ALTER TABLE `tab` ENGINE=MyISAM;
No comments:
Post a Comment