-1

I am using mySql command prompt. A username and password is created(root,root), in my local.Now i want to coonect to server db(existing one) which has different username and password.How?

Thanks

Anusha Bayya
  • 103
  • 1
  • 5
  • 17

1 Answers1

-1

At the command line, type the following command, replacing USERNAME with your username:

mysql -u USERNAME -p

At the Enter Password prompt, type your password. When you type the correct password, the mysql> prompt appears. To display a list of databases, type the following command at the mysql> prompt:

show databases;

To access a specific database, type the following command at the mysql> prompt, replacing DBNAME with the database that you want to access:

use DBNAME;

lorrie
  • 16