Tech Junkie Blog - Real World Tutorials, Happy Coding!: ACME Bank: Step 7: Add A Dev User In MySQL

Tuesday, September 22, 2020

ACME Bank: Step 7: Add A Dev User In MySQL

 In this post we are going to circle back to MySQL and continue setting up our MySQL database, so that we can use it in our application.  Since we don't want to use our root for log in and we turned off root login for remote connection.  We have to create a dedicated user for our application.  Here are the steps to create a dedicated dev use in MySQL

1. Log into MySQL with root using this command mysql -u root -p

2.  In the MySQL prompt type CREATE User 'devuser'@'localhost' IDENTIFIED BY 'P@ssw0rd'; to create the user, obviously if this is your production environment you would want to use a more secure password

3. Then type GRANT ALL PRIVILEGES ON *.* TO 'devuser'@'localhost' WITH GRANT OPTION; to grant the user all the privileges on all the objects

4. Now type FLUSH PRIVILEGES; to update and apply the privileges

5.  Now type quit, press Enter then try to log in with this command mysql -u devuser -p

Previous: Running Your Asp.Net Core Application For The First Time

Next: Install MySQL Workbench On Fedora


Search This Blog