I have a database in phpmyadmin. How can I access database of phpmyadmin from ubuntu terminal?
2 Answers
You can connect to a mysql server using the mysql command
mysql --user=USERNAME -p --host=HOSTNAME --database=DATABASENAME
This will then prompt you for the password for the specified user (because the password switch was -p instead of --password=PASSWORD). Press return without typing anything for no password.
You can find more information on how to use the command by typing man mysql or mysql --help into your terminal.
2 Comments
Parag
The problem is that i cannot find my phpmuadmin database from the terminal using the 'show databases' command
clinton3141
@Parag are you using the same username and password in the terminal that you use for phpmyadmin?
mysql -u <username> -p<password> <database_name>
Make sure no space between -p and password. Of course, this password will be visible in history.
To overcome this:
1.Leave it blank and it will ask you for it.
2.start the command with a space in front of mysql
1 Comment
Parag
I cannot find my phpmyadmin database from the mysql installed via terminal. Why? Any idea?