How to store password for MySQL

Hello,

I’m using LO Base as front end for MySQL database and Base’s forms are saved in .odt files. I want to store password for database user in Base. Now it’s neccessary to type password every time .odt is openned. Unfortunately it is not possible to setup database user without password.

Is there any solution how to do it?

Although not recommended at all, you can set up a user in MySQL without a password (I just did it). You must make sure to set privileges for your needs. The part which has a problem is Base. Once you have designated the connection requires a password, it cannot be reset in the user interface. You can, however, fix the situation. See this post - click here.

That is exactly what I’ve done. And it works. But the MySQL database can be accessed by user without password. So I need to have MySQL password protected but I want .odb file strore password. So no password will be required when I’ll open .odt with form or .odb but when I’ll want to login to MySQL directly I have to use the password…

OK, it can be done but it’s almost as bad as a user with no password. First, LO Base does not store external DB passwords. The way to get this to work is through the JDBC connection:

jdbc:mysql://127.0.0.1:3306/database?user=your_login&password=your_password

By placing the DB name, user name and password on the string and leaving the User field blank and the password box NOT checked a connection is made. The BAD news - this ALL displays along the bottom of the Base screen - NO hiding.

That helped. Thank you!

Some users have access to foreign Mysql servers in the net and may not have the privilege to remove password. Since .odb starts without connection is it possible to include a macro for connection? Yes, the password will be visible to anyone that will access the macros but will not be visible on the screen. Or the macro can read the password by accessing a stored txt file (accessible only by the user).

@xoristzatziki This question has been answered and closed. Please, if you have a question, ask as a new question.

@Ratslinger Is it safe to post a new question with the exact same title? (I do not know where else to place this forum concerning question).

@xoristzatziki Your question is different. You want to use a MACRO to create the connection. This question only wanted to store the password. Be sure your question is specific on what you are looking for and trying to accomplish.