[PHP] How do I regain the ability to create databases (phpMyAdmin)?
I've finally got both PHP and MySQL up and running, and I've learned how to create new users and databases (at least the basics). But I was told I should add a password to root/localhost, and that's been a major pain in the butt. First, it knocked out phpMyAdmin. Then I learned how to edit a file (phpMyAdmin.config.inc, or something like that), which restored phpMyAdmin. But I next discovered that I can no longer create databases. When I open up phpMyAdmin, near the top of the page is a function for creating new databases. It now says No Privilieges, just under Create New Database. I tried to retrace my steps in creating a password. I clicked on Privileges, then clicked Edit in the root/localhost row. Then I went down to where it says Change Password, clicked the Password radio button and typed in my password twice. I don't think I did anything else. So why would that knock out my databases? More important, how do I get them back? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How do I regain the ability to create databases (phpMyAdmin)?
check if the user you defined in phpMyAdmin/config.inc.php ($cfg['Servers'][$i]['user'] = ???) has the right to create new databases (db: mysql / table: user / field: Create_priv='Y') restart the mysql-server after altering the database mysql g. martin luethi Fri, 23 Jan 2004 01:26:46 -0800 Freedomware [EMAIL PROTECTED]: I've finally got both PHP and MySQL up and running, and I've learned how to create new users and databases (at least the basics). But I was told I should add a password to root/localhost, and that's been a major pain in the butt. First, it knocked out phpMyAdmin. Then I learned how to edit a file (phpMyAdmin.config.inc, or something like that), which restored phpMyAdmin. But I next discovered that I can no longer create databases. When I open up phpMyAdmin, near the top of the page is a function for creating new databases. It now says No Privilieges, just under Create New Database. I tried to retrace my steps in creating a password. I clicked on Privileges, then clicked Edit in the root/localhost row. Then I went down to where it says Change Password, clicked the Password radio button and typed in my password twice. I don't think I did anything else. So why would that knock out my databases? More important, how do I get them back? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How do I regain the ability to create databases
Martin Luethi wrote: check if the user you defined in phpMyAdmin/config.inc.php ($cfg['Servers'][$i]['user'] = ???) has the right to create new databases (db: mysql / table: user / field: Create_priv='Y') restart the mysql-server after altering the database mysql H... I'm a little confused. I don't find that particular code in my phpMyAdmin config file. But I suspect I may have done an unorthodox maneuver. If I remember correctly, it instructed me to replace user with my user name on line 81 (see below) and type in a password on the next line. * * * * * * * * * * 4.3.0) $cfg['Servers'][$i]['controluser'] = ''; // MySQL control user settings // (this user must have read-only $cfg['Servers'][$i]['controlpass'] = ''; // access to the mysql/user // and mysql/db tables) $cfg['Servers'][$i]['auth_type'] = 'config';// Authentication method (config, http or cookie based)? [LINE 81] $cfg['Servers'][$i]['user'] = ''; // MySQL user $cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed // with 'config' auth_type) $cfg['Servers'][$i]['only_db'] = ''; // If set to a db-name, only * * * * * * * * * * HOWEVER, it said the better method was to type in either http or (I can't remember the second choice offhand). I think I did it on line 133 (see below. $cfg['Servers'][$i]['controlpass'] = ''; [LINE 133] $cfg['Servers'][$i]['auth_type'] = 'http'; $cfg['Servers'][$i]['user']= 'root'; * * * * * * * * * * It sounds like I need to go back and change these two lines: [LINE 81] $cfg['Servers'][$i]['user'] = ''; // MySQL user $cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed // with 'config' inserting my username (root) between the first = ''; then typing in my password between the next = ''; Then I need to go back and delete http; does that sound right? I copied the original config file, so I could start from scratch. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How do I regain the ability to create databases
Sheez, maybe you fixed it already... I typed in the username and password, but did NOT delete http on line 133. I saved the page, but didn't restart MySQL, and it still works - I think. I haven't created a new database yet, but it's inviting me to! Thanks for the tip. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How do I regain the ability to create databases
Freedomware mailto:[EMAIL PROTECTED] on Friday, January 23, 2004 3:19 AM said: HOWEVER, it said the better method was to type in either http or (I can't remember the second choice offhand). I think I did it on line 133 (see below. Just to clarify. The difference between the two methods is that in the case where you specify your username/password within the config file, phpMyAdmin will use that data to connect to the db REGARDLESS of who accesses the phpMyAdmin url. If you put the mysql root username/password in there you'll give root access to anyone that knows the url. On the other hand if you choose http and leave the username/password blank you force the person trying to use phpMyAdmin to enter a valid username and password each time they try to use it. And of course this includes you too. Also the http setting is being ignored because you've defined a username/password within the config file. I imagine that when it's loading it's first page and doing it's checks it sees that you've got those values defined and it just skips the other part because it's not even worth thinking about (the http part that is). HTH, Chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php