-
docker run -d -p 3306:3306 --name quick_db -e MYSQL_ROOT_PASSWORD=PASSWORD123 -h quick_db --network="bridge" mysql
Give some time between these steps to allow the DB to start up
-
docker exec -it quick_db /bin/bash -c 'mysql -uroot -pPASSWORD123'
Steps to create a test user:
-
DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');
-
FLUSH PRIVILEGES;
-
CREATE DATABASE test_db CHARACTER SET utf8 COLLATE utf8_general_ci;
-
CREATE USER userName@'%' IDENTIFIED BY 'tmp_pass';
-
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES ON userName.* TO 'tbhushan'@'%';
-
-
SELECT default_character_set_name, schema_name FROM information_schema.SCHEMATA;
RJM Article Type
Work Notes