-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

1
  • mysql --help will show you the application usage Commented Mar 30, 2017 at 5:45

1 Answer 1

-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;

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.