Phpmyadmin?

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Phpmyadmin?

Postby teamzulu » 06. December 2007 15:44

When I click on the /phpmyadmin/ link it shows there is a password issue... well I want to lock this up. But how? What do I need to change in the MYSQL database + what do I need to do with the config.inc.php file? I have give a password in MYSQL & the config.inc.php - No more security issue.. but also - it does not prompt me for a password?? I simply just login. Ideally I would like to have mutiple users be able to use the MYSQL - but without seeing the others databases.. any help would be great!
teamzulu
 
Posts: 2
Joined: 06. December 2007 15:39

Postby KallistaAEnvarou » 07. December 2007 21:36

How can I set a "root" password in MySQL? (method 1)

How can I set a "root" password in MySQL? (method 2)

How can I set a "root" password in MySQL (method 3)

When you want to create additional users, you can create a PHP page that connects root to the database mysql and do an insert query into the users table by identifying the username, password, and any select privileges, then flush privileges. Then, you can insert into the db table with the user name. Since the tables have enum properties, you'll need to type 1 for no and 2 for yes. Here's an example.

mysql_query("INSERT INTO user (host,user,password,create_priv,delete_priv,drop_priv,insert_priv,select_priv,update_priv) VALUES('localhost','$username',PASSWORD('$password'),'2','2','2','2','2','2')");

mysql_query("FLUSH PRIVILEGES");

Then you'll have to insert the user into the database with the following code:

mysql_query("INSERT INTO db (host,db,user,create_priv,delete_priv,drop_priv,insert_priv,select_priv,update_priv) VALUES('localhost','$database','$username','1','1','1','1','2','1')");

so that you can give this user create, delete, drop, insert, select, and update globally but only select locally on that database.
KallistaAEnvarou
 
Posts: 126
Joined: 02. December 2007 17:33
Location: Cold Cold California


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 57 guests