MySQL Workbench Add User and Connect to Database

MySQL Workbench Add User and Connect to Database


In this lecture we will create new user and connect to the database using MySQL workbench. From my Windows 7 operating system, I’ve opened MySQL Workbench tool. Open MySQL connection window from, top menu, Database ->Connect to Database option. Use Hostname, port number and ‘root’ username. Click OK and enter the ‘root’ usrename password to connect to database server. Once we are logged in to the database server, in the left hand column window, under ‘Management’ menu, there is a link for ‘Users and Privileges’ window. Open the ‘Users and Privileges’ window by clicking the link. On this new screen, In the center screen, we can see the current users for our MySQL database server. Click the bottom ‘Add Account’ button to add a new user, which opens a new window to enter new user details. Here, choose the login name, I’ll enter “testuser”, enter and confirm password for the new user. In ‘Account Limits’ tab we can limit the users to maximum, queries, updates or connections. In ‘Administrative Roles’ we can allow or disallow certain privileges to the new user. ‘Database Administrators’ (DBA) have all the permission. You can also restrict or allow new user to access certain databases or schemas, using this option schemas privileges. Click ‘apply’ button to save the new user. Close this active session by clicking this “X” icon (cross icon), and now connect to the database server again using the new user details. Click, Database ->Connect to Database and this time instead of “root” username I’ll type the new user. Click OK and enter the new user password. And here we are logged in, in MySQL database server using the new user information. Now depending upon the role assigned to the new user, the user can manage the database from the new account.

Danny Hutson

18 thoughts on “MySQL Workbench Add User and Connect to Database

  1. Dude…..really nice work. Please add number on lecctures titles to get the sequence of tutorials you made. Like 1. Intro and 2. Add uers . .3. Update database etc.

  2. So….. with all the viewers.. no one ever thought of how to disconnect? Only proves that 1 in a thousand people.. only 1 (me!) person who is smart.

  3. Doooood!!! You 'da man! I've been trying to get HEIDISQL to work for 2 weeks, and this was what got it to work. Create a new user!

Leave a Reply

Your email address will not be published. Required fields are marked *