Deleted my user name 'root' and ip address

hi, something very wrong happened while i was following the book “build your own database driven websites using php and mysql”. i was up to chapter 4, CONNECTING TO MYSQL WITH PHP

i used phpMYAdmin to create a user name and password that was more personal. i was successful in the operation, but i still had 2 “users”: root and my ip address with no passwords. phpMyAdmin advised (printed at the bottom of the page) to create password. so, i figured that the new settings were enough, and the other 2 were redundant, so, i deleted them in phpMyAdmin. that was my mistake.

i can still access index.php by clicking “localhost” through the wamp menu, but i get the following if click on the phpMyAdmin icon under “tools” :rolleyes:

phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

i cannot re-enter the 2 users i deleted if i cannot open phpMyAdmin.

can i update a config file somewhere to reflect my new user name and password? or do i have to reinstall wamp completely?

ps: if i use the MySQL console, the first prompt reads “password:”. i typed the password that i assigned in phpMyAdmin earlier, and the system beeps at me, and closes. a very brief error message flashes. it is too fast to read, but i am sure that it says that i cannot access the server, reflecting the same problem that is explained above in red.

pps: i did a system restore, but it didn’t revert the delete operation. i need to get ‘root’ back, and maybe the ip address back in the list of users. dumb, i know. very mad at myself.

thanks in advance,
codibel

i changed my config.inc.php file by removing my new information, and replacing the old (as far as i believe it to be accurate) information. i took out the personalized user with “root”, and my password back to null. (no password entered).

now, if i select phpMyAdmin from the wamp 2.0 menu, i get a blank, white screen iniside http://localost/phpmyadmin/ if i try the console, it still beeps and will not connect.

can i just uninstall and start over? i can’t figure this out.

thanks,
codibel

Go into the config.inc.php you found in the php my admin folder, and there are lines near the top for a db user and password (don’t have my file to hand).
Change to user and pass you changed earlier.

Go into the config.inc.php you found in the php my admin folder, and there are lines near the top for a db user and password (don’t have my file to hand).
Change to user and pass you changed earlier.

Goto the WAMP folder, then goto and you should see a folder for phpmyadmin, the exact name will depend on the version. Inside the phpmyadmin folder you’ll find a file called config.inc.php in which resides the database connection info which phpmyadmin uses to connect to MySQL.

Did you delete any of the existing databases at all? Making any changes to either the information_schema or mysql databases could cause things to go screwy

hello adam, thank you for your suggestion.

i tried, but it didn’t work.

[‘user’] = ‘xxxxxx’;
$cfg[‘Servers’][$i]

[‘password’] = ‘xxxxxxxxx’;
$cfg[‘Servers’]

[$i][‘AllowYesPassword’] = true;

i think this last line, about ‘allowpassword’ might have to be changed. should i take out the Yes?

just spitballing.

thanks again,
codibel

hi,spacephoenix,

btw: my error message read: “MySQL said: #1045 - Access denied for user ‘codibel’@‘localhost’ (using password: YES)”

i did not delete any databases intentionally; i deleted what i thought were “users”. i checked “privileges” in MySQL, that gave me a list of users. i checked the boxes next to “root” and the box next to the IP adderess (122.33.01 or something like that.) maybe the databases went with them. i am not concerned though, only one:the joke db i made up for the lesson.

i found 3 config.inc.php files. one in the phpmyadmin folder inside apps folder of wamp. that file contained my newly created user name and password. there were 2 additional config.inc.php files, inside C:\\wamp\apps\phpmyadmin\setup\frames, and C:\\wamp\scripts. they were different files, not holding any text specific to my information.

can i do anything with that file? waiting.

many thanks!
codibel