Skip to content

Instantly share code, notes, and snippets.

@freestrings
Created January 12, 2018 06:34
Show Gist options
  • Save freestrings/37c0f3c65852dc83a5f678978cec883c to your computer and use it in GitHub Desktop.
Save freestrings/37c0f3c65852dc83a5f678978cec883c to your computer and use it in GitHub Desktop.
docker mysql host -> container
select @password:=PASSWORD('root');
GRANT USAGE ON *.* TO 'root'@'%' IDENTIFIED BY PASSWORD '*81F5E21E35407D884A6CD4A731AEBFB6AF209E1B';
create database testa;
GRANT ALL PRIVILEGES ON `testa`.* TO 'root'@'%';
flush privileges;
SET general_log = 1;
CREATE TABLE dept (
dept_no INT(11) unsigned NOT NULL,
dept_name VARCHAR(32) NOT NULL,
PRIMARY KEY (dept_no)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment