How can I get the data from a database on localhost phpmyadmin?

I need to get some data from a database that I created in phpmyadmin, since the connection is made but I want to get that data and save it in a variable, I work in NetBeans 8.2