简体   繁体   中英

setting up phpMyAdmin with WAMP server

I got phpmyadmin to log on, and followed this link . Now the problem is that I wrote php code for accessing a database and reading data from the tables using a sql query but it fails to find the database I created using mysql command line console. However, it can find the database I created using the phpmyadmin. Why is that?

Several things could be the case here:

  • Have you set the blowfish secret?

     $cfg['blowfish_secret'] = '7hfs97fs4fs847'; 
  • Have you set the auth config parameter?

     $cfg['Servers'][$i]['auth_type'] = 'config'; 
  • Tried logging in with a blank password?

     $cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = ''; 
  • reset the root password for MySQL?

     mysql>use mysql; mysql>update user set Password=PASSWORD('NewPass') where User='root'; mysql> flush privileges; mysql>exit 

Let me know if one of these solution helped you.

Read the official documentation, you`ll have to setup some other variables too: http://www.phpmyadmin.net/documentation/Documentation.html#setup

For example: $cfg['Servers'][$i]['auth_type'] = 'config';

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM