Accessing OpenMRS Database through Terminal

32 views
Skip to first unread message

Nicole Francisco

unread,
Jun 30, 2013, 11:53:21 PM6/30/13
to implem...@openmrs.org
Hello,

I've just newly installed OpenMRS and am trying to access the database through Terminal. I followed the instructions on this page.

So I enter the following:

$ ./mysql -u openmrs -p
$ Enter password: 
$ ERROR 1045 (28000): Access denied for user 'openmrs'@'localhost' (using password: YES)

I used connection.password from my openmrs-standalone-runtime.properties file, but I get the above error. I drag the string from the text file to the Terminal, so I doubt I entered the password wrong. Any suggestions?

Thank you all for your kind help!


Harsha Siriwardena

unread,
Jul 1, 2013, 12:48:07 AM7/1/13
to implem...@openmrs.org
Hi Nicole,

Why dont you try login with mysql "root" user similarly ?
The password you find at openmrs-standalone-runtime.properties is a encrypted one so that pass wont work unless you decrypt using the encryption key.

Thank you,
Harsha




--
OpenMRS Implementers: http://go.openmrs.org/implementers
Post: implem...@openmrs.org
Unsubscribe: implementers...@openmrs.org
Manage your OpenMRS subscriptions at https://id.openmrs.org/
 
 

Harsha Siriwardena

unread,
Jul 1, 2013, 12:53:51 AM7/1/13
to implem...@openmrs.org
Hi,

I apologize, you was right. it should work, I think you need to check the mysql username again, in my openmrs instance its named as "openmrs_user"

so try with > ./mysql -u openmrs_user -p  and the password you find at prop file

Thank you,
Harsha
Message has been deleted

Nicole Francisco

unread,
Jul 1, 2013, 1:34:47 AM7/1/13
to implem...@openmrs.org
Hi Harsha,

In the file, connection.username is "openmrs". So the error still applies unfortunately.

Thanks for your help though!

Nyoman Ribeka

unread,
Jul 2, 2013, 10:32:25 AM7/2/13
to OpenMRS Implementers
Nicole,

If the installation was successful, you should be able to access your mysql using the username and password in your runtime props. Probably the installation is not completed successfully?  Are you running windows or linux? Probably the best option you have is resetting the root password?

http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html
--
Thanks,

- Nyoman Ribeka
Message has been deleted

Wyclif Luyima

unread,
Aug 7, 2013, 11:36:05 AM8/7/13
to Implementers
What you are entering in the terminal is trying to connect to the mysql server instance that is running on your machine, i can see from your runtime properties file that you are running the standalone, so first make sure the standalone is started so that the embedded mysql server is running and note the port it is listening on from the standlone's window which i think should be 3317 as seen in your connection url  in the properties file, then on the command line you have to specify this port and the host name, so something like this should work > mysql -u openmrs -h 127.0.0.1 -P 3317 -p

Wyclif


On Tue, Aug 6, 2013 at 6:30 PM, Nicholas Sahagian <nsaha...@gmail.com> wrote:
Hi, I am also having this same problem.  Here is a copy of my runtime.properties file.


#Last updated by the OpenMRS Standalone application.
#Thu Jun 27 12:58:26 EDT 2013
tomcatport=8082
module.allow_web_admin=true
connection.username=openmrs
auto_update_database=false
application_data_directory=appdata
connection.password=0hrLnxYL53w~
vm_arguments=-Xmx512m -Xms512m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:NewSize=128m

I am assuming that the password is encrypted, and that is the reason for my inability to access the database.  Are there means of decrypting the file?  Any thought on how I might proceed?

--
OpenMRS Implementers: http://go.openmrs.org/implementers
Post: implem...@openmrs.org
Unsubscribe: implementers...@openmrs.org
Manage your OpenMRS subscriptions at https://id.openmrs.org/
 
 



--
Wyclif Luyima
Regenstrief Institute Inc.

Confidentiality Notice: The contents of this message and any files transmitted with it may contain confidential and/or privileged information and are intended solely for the use of the named addressee(s). Additionally, the information contained herein may have been disclosed to you from medical records with confidentiality protected by federal and state laws. Federal regulations and State laws prohibit you from making further disclosure of such information without the specific written consent of the person to whom the information pertains or as otherwise permitted by such regulations. A general authorization for the release of medical or other information is not sufficient for this purpose.

If you have received this message in error, please notify the sender by return e-mail and delete the original message. Any retention, disclosure, copying, distribution or use of this information by anyone other than the intended recipient is strictly prohibited.
Reply all
Reply to author
Forward
0 new messages