I need to find my MySQL username. When I open the MySQL command line client, it only asks me for my password. I don\'t remember my username. And for connectivity with JDBC, I ne
For example, you can try:
//If you want to get user, you need start query in your mysql:
SELECT user(); // output your user: root@localhost
SELECT system_user(); // --
//If you want to get port your "mysql://user:pass@hostname:port/db"
SELECT @@port; //3306 is default
//If you want hostname your db, you can execute query
SELECT @@hostname;