2.1 Create MySQL User - adiralashiva8/pytest-historic GitHub Wiki
Pytest Historic uses custom user to fetch data from MySQL server those credentials are
- U: superuser
- P: passw0rd
By default above information wont be available in MySQL DB initially, users have to create it own. In this section will discuss on creating pytesthistoric user with local and remote access to mysql
superuser
account with localhost access
Step 1: Create -
Open command prompt (root to mysql:
mysql -uroot -p123456
) -
Create user with localhost access (type following query and hit enter)
CREATE USER 'superuser'@'localhost' IDENTIFIED BY 'passw0rd';
-
Grant localhost access to above user (type following query and hit enter)
GRANT ALL PRIVILEGES ON *.* TO 'superuser'@'localhost' WITH GRANT OPTION;
superuser
account with remote access
Step 2: Create -
Open command prompt (root to mysql:
mysql -uroot -p123456
) -
Create user with localhost access (type following query and hit enter)
CREATE USER 'superuser'@'%' IDENTIFIED BY 'passw0rd';
-
Grant localhost access to above user (type following query and hit enter)
GRANT ALL PRIVILEGES ON *.* TO 'superuser'@'%' WITH GRANT OPTION;
Step 3: Reload Grant table
-
Open command prompt (root to mysql:
mysql -uroot -p123456
) -
Create user with localhost access (type following query and hit enter)
FLUSH PRIVILEGES;
You have successfully created
superuser
with remote and localhost access (which required for pytest-historic)