I downloaded the most recent version of XAMPP (v.1.7.7) and decided start a database. When I opened phpMyAdmin, it alerts me there is a new version of phpMyAdmin available. I downloaded it from online, and I deleted the old version of phpMyAdmin and replaced it with the current version (v.3.5.1). I opened it up and it came up with a log-in screen. I entered in "root" without a password, but it alerts me I need one. I don't know any password nor I know any alternative log-ins. How would I log-in to enter phpMyAdmin?
Asked
Active
Viewed 1.1e+01k times
15
-
what about `root` as password or `password` – Andreas Louv Jun 02 '12 at 23:30
-
root, password, and admin dont work as the password – slippery Jun 02 '12 at 23:34
-
Can you find the file `/htdocs/xampp/phpmyadmin/config.inc.php` ? Look for `$cfg['Servers'][$i]['password']` in this file if you can. – zessx Jun 02 '12 at 23:38
3 Answers
24
Enabling login without a password, to make it work exactly as before
You'll need to change your configuration file. Open up your XAMPP installation directory, browse to the folder phpmyadmin, and look for a file called config.inc.php. If there isn't one already, you'll first need to copy config.sample.inc.php to config.inc.php. Then, just open config.inc.php and find this line:
$cfg['Servers'][$i]['AllowNoPassword'] = false;
Change it to:
$cfg['Servers'][$i]['AllowNoPassword'] = true;
Alternatively, just add a password
Open a command prompt and type this, followed by Enter:
mysqladmin -u root -p pass
When it asks you for the current password, just press Enter again. Then set the new password, and log in to phpMyAdmin using that.
Ry-
- 218,210
- 55
- 464
- 476
-
Thanks! I tried this method, but I havent thought of changing the file name. ;) – slippery Jun 02 '12 at 23:42
-
-
mysqladmin -u root -p pass Need explanation... after what circumstances does this work? – Fusion Mar 04 '16 at 17:35
19
Default is:
Username: root
Password: (just leave it blank)
The Password is set to 'password' in some versions.
CHarris
- 2,693
- 8
- 45
- 71
0
In new versions note that you have to change your code to like this:
mysqli_connect($mysql_hostname, $mysql_username, $mysql_password, $mysql_dbname);
And for more look to this:
Fatal error: Uncaught Error: Call to undefined function mysql_connect()
Noel Widmer
- 4,444
- 9
- 45
- 69
Radwan Al Hourani
- 31
- 8