Use the following steps to select the database:
mysql -u username -p
it will prompt for password, Please enter password. Now list all the databases
show databases;
select the database which you want to select using the command:
use databaseName;
select data from any table:
select * from tableName limit 10;
You can select your database using the command use photogallery;
Thanks !