Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I specify the password in the MYSQL connection URL?

Tags:

mysql

I'm currently using this connection URL for MYSQL

mysql://root:macbookair@localhost:3306/test_db

and getting this error.

[INFO] require: ./mysql
[INFO] connecting
[ERROR] Error: ER_ACCESS_DENIED_ERROR: Access denied for user 'root'@'localhost' (using password: YES)

How do I specify the password in the MYSQL connection URL?

like image 518
Mawuli Adzoe Avatar asked Nov 22 '15 11:11

Mawuli Adzoe


2 Answers

Got it now.

The connection URL is in this format:

mysql://<username>:<password>@<host>:<port>/<db_name>

thus the password worked when I replaced macbookair in my url with the password.

like image 76
Mawuli Adzoe Avatar answered Oct 05 '22 11:10

Mawuli Adzoe


try below

jdbc:mysql://localhost:3306/organizer?user=root&password=root
like image 27
Pravin Bansal Avatar answered Oct 05 '22 12:10

Pravin Bansal