Access mysql Database of openMRS using Windows Command Line

As you can see that openmrs database is running at 3316. but i am not able to access this database as instructed here

OpenMRS Standalone - Documentation - OpenMRS Wiki

When i try to access database using

mysql -u openmrs -p --port= 3317 –host= 127.0 . 0.1`

Using password from openmrs-standalone-runtime.properties file

i get this error

ERROR 1045 (28000): Access denied for user ‘openmrs’@‘localhost’ (using password: YES)

I have also visited this link

MySQL ERROR 1045 (28000): Access denied for user 'bill'@'localhost' (using password: YES) - Stack Overflow

but it didn’t solved my problem, think because when i do not find openMRS username mentioned in mysql.users

@meullah kindly have alook at this MySQL db connectivity issue.

If it still persists and you can not see the openmrs database in your mysql then re-extract and a run your standalone instance afresh

1 Like

heilo,coud you first make sure that your standalone instance is started weill,then move to the bin folder under the database on terminal ,from this point you can use the mysql command

One more thing , Another option is to access mysql Database of running openmrs instance using any mysql client like mysql workbench you can as well follow this link

1 Like

Some tested steps here too,since its stand alone

1) make sure you run at the mysql command at the bin folder of the database within the standalone folder

2) On terminal,run mysql -u openmrs -p --port=3316 --host=127.0.0.1

3)Then you can add the password from the run time properties file

1 Like

@sharif @gcliff @herbert24 Thank you all for your input.

It worked 100 %

2 Likes