Password security
#1

Hello! How to secure password when connecting to (for example) MySQL server?

Код:
#define MYSQL_PASS "password"
mysql_connect(... MYSQL_PASS ...)
Obviosuly this is not the correct way to do it, so which is?
Reply
#2

Use this:

PHP код:
#define mysql_host "127.0.0.1" //Has to be a string
#define mysql_user "root" //Has to be a string
#define mysql_password "" //There is none for wamp unless you set one.
#define mysql_database "sa-mp" //Has to be a string 
PHP код:
mysql_connect(mysql_hostmysql_usermysql_databasemysql_password); 
Reply
#3

Did you even read my post?

Edit: Nevermind, solution found - I'm using protected file (db_credentials.cfg), read from it and then connect to the server.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)