Subscribe
Article Time Stamp: 02 June 2007, 05:03:17 GMT+7

phpMyAdmin Syntax Error And Solutions




Cannot load mysql extension. Please check your PHP configuration



::Solutions::
The error message that displayed above means that we didn't include MySQL library to PHP configuration

To adding MySQL library to PHP configuration, just follow these steps:
1. Open PHP configuration file (php.ini) using your favorite text editor (such as notepad)
2. Search for this syntax: ;extension=php_mysql.dll
3. If you found it, just delete the comment character (;)
4. Save the file and restart the Apache webserver. After that, try to run the phpMyAdmin again from your browser
5. If it's come with the same errors, then it means Apache couldn't find libmysql.dll file (this file is require for php_mysql.dll). Usually, this file is located at your PHP installation directory
6. If you find it, you must change the Windows path to that location.
7. Go to Control Panel and open the System icon (Start -> Control Panel -> System)
8. Go to the Advanced tab
9. Click on the 'Environment Variables' button
10. Look into the 'System variables' panel, and highlight Path variable by click on it
11. Click Edit button, and at the Variable value, at the end of the syntax, add the directory that contains libmysql.dll file
12. Click OK and restart your computer
13. Try again to run the phpMyAdmin from your browser




1045 - Access denied for user 'root'@'localhost' (using password: NO)



::Solutions::
This error message means that your login or password to connect to mysql database is wrong. In order for phpMyAdmin could connect to mysql database, you must supply the login and password at phpMyAdmin configuration file.

Almost all configurable data is placed in config.inc.php. This file only needs to contain the parameters you want to change from their corresponding default value in phpMyAdmin/libraries/config.default.php. If config.inc.php does not exist at the phpMyAdmin directory, just copy config.default.php from libraries directory to phpMyAdmin directory, and rename it to config.inc.php.

Locate this string: $cfg['PmaAbsoluteUri'] = '';

Inside the ' ' place the location of where phpMyAdmin is installed on the server. In this case we installed it within the root directory under its own folder name. So we’ll use “http://localhost/phpMyAdmin/” as our absolute URL location.

There are 3 authentication methods that we can use to connect to phpMyAdmin:

A. config method (the default method)
This method is the least secure, as it requires storing your MySQL username and password in the file on the server. Anyone who would find the directory to your phpMyadmin installation would then be able to access your databases. This is the default method, however.

If you use the 'config' authentication method, it is strongly recommended that you secure the directory in which phpMyAdmin is installed, such as adding password protect to phpMyAdmin directory. This extra step is not needed when using either the 'http' or 'cookie' authentication methods.

Locate this string: $cfg['Servers'][$i]['auth_type'] = 'config';
Locate this string: $cfg['Servers'][$i]['user'] = 'put your MySQL login here';
Locate this string: $cfg['Servers'][$i]['password'] = 'put your MySQL password here';

B. http method
These methods are more secure, as your username and password are not stored on the server in your configuration file. The 'http' option uses the Apache http authentication method.

Locate this string: $cfg['Servers'][$i]['auth_type'] = 'http';
Locate this string: $cfg['Servers'][$i]['user'] = '';
Locate this string: $cfg['Servers'][$i]['password'] = '';

C. cookie method (recommended method)
These methods are more secure, as your username and password are not stored on the server in your configuration file. The 'cookie' method uses cookies, and has the advantage that you can "Log Out" at the end of your session, deleting the cookie.

Locate this string: $cfg['Servers'][$i]['auth_type'] = 'cookie';
Locate this string: $cfg['Servers'][$i]['user'] = '';
Locate this string: $cfg['Servers'][$i]['password'] = '';
Locate this string: $cfg['blowfish_secret'] = 'fill anything here';

For the blowish_secret values, you can fill any alphabets, in example you can use 716e3c0.88759346, but, keep in mind that the maximum length seems to be 46 characters. The passphrase is just used internally to encrypt the password - you will not be prompted for it later.


After that try to run phpMyAdmin again by using your favorite browser and point it to http://localhost/phpMyAdmin/index.php




1251 - Client does not support authentication protocol requested by server; consider upgrading MySQL client



::Solutions::
Try using MySQL Command Client (example if you use MySQL version 5, then you can access it from start menu - programs - MySQL - MySQL Server 5.0 - MySQL Command Client), then do the following command:

mysql> UPDATE mysql.user
SET password=OLD_PASSWORD('enter your old password here')
WHERE user='enter your login here'
AND host='enter your host here, eg. localhost';

mysql> flush privileges;

If you’re able to login with no errors, then you’ve setup phpMyAdmin successfully




The mbstring PHP extension was not found and you seem to be using multibyte charset. Without mbstring extension phpMyAdmin is unable to split strings correctly and it may result in unexpected results



::Solutions::
This error tell us that mbstring library didn't load at PHP. Without mbstring extension, phpMyAdmin is unable to split strings correctly and it may result in unexpected results.

In order to load mbstring library, we must do:

1. Open PHP configuration file (php.ini) using your favorite text editor (such as notepad)

2. Find this syntax:
;extension=php_mbstring.dll

3. Delete the comment character (;)

4. Save the file and restart the apache webserver

5. Try to open up phpMyAdmin again

Article Source: Monx Digital Library

Copyrighted@ Monx Digital Library, otherwise stated
Use of our service is protected by our Terms of Use



 Back To Previous Page ...  



Your Ad Here

 

 

 

AQWorlds Banner