1

I have a database in phpmyadmin. How can I access database of phpmyadmin from ubuntu terminal?

2 Answers 2

4

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.

Sign up to request clarification or add additional context in comments.

2 Comments

The problem is that i cannot find my phpmuadmin database from the terminal using the 'show databases' command
@Parag are you using the same username and password in the terminal that you use for phpmyadmin?
0
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

I cannot find my phpmyadmin database from the mysql installed via terminal. Why? Any idea?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.