Pages

Friday, March 22, 2013

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

[root@servert1 ~]# /etc/init.d/mysqld stop
Stopping MySQL: [ OK ]
[root@servert1 ~]# mysqld_safe --skip-grant-tables &
[1] 13694
[root@servert1 ~]# Starting mysqld daemon with databases from /var/lib/mysql

root@servert1 ~]# mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.77 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> update user set password=PASSWORD("testpass") where User='root';
ERROR 1046 (3D000): No database selected
mysql> show databases;

+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
+--------------------+
3 rows in set (0.13 sec)
mysql> use mysql; 
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+---------------------------+

| Tables_in_mysql |
+---------------------------+
| columns_priv |
| db |
| func |
| help_category |
| help_keyword |
| help_relation |
| help_topic |
| host |
| proc |
| procs_priv |
| tables_priv |
| time_zone |
| time_zone_leap_second |
| time_zone_name |
| time_zone_transition |
| time_zone_transition_type |
| user |
+---------------------------+
17 rows in set (0.00 sec)


mysql> update user set password=PASSWORD("testpass") where User='root';
Query OK, 3 rows affected (0.05 sec)
Rows matched: 3 Changed: 3 Warnings: 0

mysql> flush privileges;
Query OK, 0 rows affected (0.04 sec)

mysql> quit
Bye
[root@servert1 ~]# /etc/init.d/mysql restart
bash: /etc/init.d/mysql: No such file or directory
[root@servert1 ~]# /etc/init.d/mysqld restart
STOPPING server from pid file /var/run/mysqld/mysqld.pid
101120 04:17:15 mysqld ended
Stopping MySQL: [ OK ]
Starting MySQL: [ OK ]

[1]+ Done mysqld_safe --skip-grant-tables
root@servert1 ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.77 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.


mysql> quit
Bye

.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

If you are getting “(13)Permission denied: /home/username/public_html/shop/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable, referer: http://www.yourdomain.com/shop/index.html” error in  apache error logs file /usr/local/apache/logs/error_log as well as the site is showing 403 Forbidden Error.

Then first please check the permissions of your folder and .htaccess file because folder permission are most likely 755 and .htaccess permission 644. Permissions can be changed via FTP or SSH.

In case you still are getting the same problem, then it might be the Frontpage Extensions causing the problem. To fix:

* Login into your CPanel account
* Click on Frontpage Extensions icon
* Click on Reinstall extensions button beside your problem domain.
* Done.

(make sure to have a backup copy of your data before reinstalling Frontpage)

And the site is showing “403 Forbidden Error”.
At first, I suspect it’s .htaccess problem, but actually it’s caused by Frontpage Extension.

To solve “.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable” follow the steps below:-

* Login into your CPanel account
* Click on “Frontpage Extensions” icon
* Click on “Reinstall extensions” button beside your problem domain.
*If you do not use any frontpage extensions, it’s good to uninstall this extension
* Done. The “.htaccess pcfg_openfile: unable to check htaccess file” problem has been fixed.

** If you are not on CPanel hosting, please contact your system administrator to fix the problem. ***

http://help.directadmin.com/item.php?id=363

Thursday, March 21, 2013

Configuration File name for Scripts.

Configuration File name for Scripts.

Usually there are many scripts available and they have different configuration file name using which we can use to update the configuration of website and it does include database username and password details.

If you have root or shell access you can locate the file under using below cmd, but make sure are are in the correct document root of the domain.
find . -type f -name “config_file”
i.e
find . -type f -name “wp-config.php”

Below are the Configuration file name for the scripts.

WordPress >> wp-config.php

Joomla >> configuration.php

Drupal >> sites/default/settings.php

osCommerce >> includes/configure.php
admin/includes/configure.php
Cube Cart >> includes/global.inc.php

Zen Cart >> includes/configure.php
admin/includes/configure.php

PHPlist >> config/config.php

Magento >> app/etc/local.xml

Mambo >> configuration.php

MyBB >> inc/config.php

SMF >> Settings.php

Soholaunch >> sohoadmin/config/isp.conf.php

B2 Evolution >> conf/_basic_config.php

Boonex Dolphin >> inc/header.inc.php

Coppermine Photo Gallery >> include/config.inc.php

dotProject >> includes/config.php

FAQMasterFlex >> faq_config.php

Geeklog >> db-config.php
siteconfig.php
ib-common.php

Noahs Classifieds >> app/config.php

Moodle >> config.php

Gallery >> config.php

Nucleus >> config.php

PHP-Nuke >> config.php

phpBB >> config.php

Post-Nuke >> config.php

Siteframe >> config.php

phpWCMS >> include/inc_conf/conf.inc.php

phpWebSite >> conf/config.php

PhpWiki >> admin.php
lib/config.php

TYPO3 >> typo3conf/localconf.php

vBulletin >> includes/config.php

WebCalendar >> includes/settings.php

Xoops >> mainfile.php