Dup Goto 📝

MysqlBasicAdmin

PT2/aw/db/mysql sql mysql admin dbadmin 07-31 13:46:43
To Pop
18 lines, 117 words, 726 chars Monday 2023-07-31 13:46:43
show databases; # list databases
describe mysql.user; # show schema for user database
select host, user from mysql.user; # list users

Creating Users

create database db1;
grant all on db1.* to 'mrflibble'@'%' identified by 'hexvision';

Trivial Example --- Key Value Store

create table data(id int auto_increment primary key, name varchar(128), data blob);

See SimpleKeyValueStore. Note that this isn't the best use of an SQL database, nor is such a database the best choice if all you want is a key-value store. But perhaps you're in a position that MySQL is all you have (e.g. if you are on a shared web host that gives you a simple LAMP stack).