StumbleUpon  Del.icio.us  Facebook  Reddit  Add to diigo  


Follow - Monx007
Article Time Stamp: 11 October 2010, 23:28:54 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
- Connect Error (2000) mysqlnd cannot connect to MySQL 4.1+ using old authentication



::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


But, if you're stil have the same problem, then do these following withing your MySQL Command Line:
1. First check with the SQL query
SHOW VARIABLES LIKE 'old_passwords'

This to check whether the server is set to use the old password schema by default. If this returns old_passwords=Off you just happen to have old password entries in the users tables. The MySQL will use the old authentication routine for these accounts. But you can simply set a new password for the account and the new routine will be used.

2. You can check which routine will be used by taking a look at the mysql.users table (with an account that has access to that table)
SELECT `User`, `Host`, Length(`Password`) FROM mysql.user

This will return 16 for accounts with old passwords and 41 for accounts with new passwords (and 0 for accounts with no password at all, you might want to take care of those as well).

3. Either use the user managements tools of the MySQL front end (if there are any) or
SET PASSWORD FOR 'User'@'Host'=PASSWORD('yourpassword');
FLUSH Privileges


(replace User and Host with the values you' got from the previous query). Then check the length of the password again. It should be 41 now and you should be able to connect to the server.




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




Bzip2 compression and decompression requires functions (bzopen, bzcompress) which are unavailable on this system.



::Solutions::
This error tell us that Bzip library didn't load at PHP. Without Bzip extension, phpMyAdmin is unable to Bzip compression functions.

In order to load Bzip 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_bz2.dll

3. Delete the comment character (;)

4. Save the file and restart the apache webserver

5. Try to open up phpMyAdmin again




Directory config, whis is used by the setup script, still exists in your phpMyAdmin directory. You should remove it once phpMyAdmin has been configured.



::Solutions::
This warning tell us that the configuration directory still exist in your phpMyAdmin directory that may need only during using Wizard Setup configuration. You SHOULD remove this configuration directory for security measures. You may look the configuration directory at phpMyAdmin/config. Delete the config directory under phpMyAdmin root directory to solve this problem.




The additional features for working with linked tables has been deactivated. To find out why click here.



::Solutions::
phpMyAdmin comes with additional features for working with linked tables. But, you need to configure it first to make it work.

Open the create_tables.sql file at scripts directory under the phpMyAdmin directory. This script expects the user pma to already be existing. You can use phpMyAdmin to create this use via Privileges menu (also you may want to set 'localhost' at the host login information).

After that, you can run the create_tables.sql script.

Then, you must defined in config.inc.php (according to the create_tables.sql script. If you change the scripts, the you must change this below parameters too according to your change):
- $cfg['Servers'][$i]['controluser'] = 'pma';
MySQL control user settings (this user must have read-only access to the "mysql/user" and "mysql/db" tables). The controluser is also used for all relational features (pmadb)

- $cfg['Servers'][$i]['controlpass'] = ''; => fill with you pma password
This is the controluser password

- $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
Database used for Relation, Bookmark and PDF Features

- $cfg['Servers'][$i]['relation'] = 'pma_relation';
Table to describe the relation between links (see doc)

- $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
Bookmark table

- $cfg['Servers'][$i]['table_info'] = 'pma_table_info';
Table to describe the display fields

- $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
Table to describe the tables position for the PDF schema

- $cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
Table to describe pages of relationpdf

- $cfg['Servers'][$i]['column_info'] = 'pma_column_info';
Table to store column information

- $cfg['Servers'][$i]['history'] = 'pma_history';
Table to store SQL history

- $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
Table to store the coordinates for Designer


After that, you may want to restart the phpMyAdmin. If the warning message still shows up, you may want to check all the above steps closely.

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 ...  



 

 

 

AQWorlds Nulgath Secret Walkthrough