Join David Gassner for an in-depth discussion in this video Creating a database user in MySQL, part of Java Database Integration with JDBC.
- View Offline
In order to make the coding of our exercise files consistent, I'm going to show you how…to create a database user that has access to the MySQL database server, and we'll use…the credentials for that user throughout the course.…In phpMyAdmin go to the home-screen, from there click on the Users tab, depending on…how you installed MySQL and what software bundle you used, you might see a variety of…user identities in this list.…Minimally, you should see one named root, which is the super user or administrator of the entire database server.…
It's typically a good idea to create your own database users.…So on this screen I'll click Add user.…I'll set my username and password to some very simple easy to remember values.…I'll set the User name to dbuser, all lowercase.…For the Host, I'll pull down the list and choose Local, and that sets the host to localhost.…I'll click into the Password, and I'll type a simple string of dbpassword, again, all lowercase,…and I'll type it twice to make sure I got it right.…
Now I'll scroll a little further down, and I'll click the Check All link, and that adds…
Author David Gassner explains how to choose a JDBC driver and connect to one or more databases. He also provides detailed instructions on reading, selecting, and updating data; calling stored procedures; managing data via JavaBean classes or with prepared statements; and working with metadata.
- Importing a MySQL database
- Connecting to databases
- Handling JDBC exceptions
- Looping through result sets
- Limiting the number of fetched rows
- Filtering data with prepared statements
- Calling stored procedures
- Inserting, updating, and deleting rows with prepared statements
- Using a persistent database connection
- Committing and rolling back transactions