Showing posts with label mysql. Show all posts
Showing posts with label mysql. Show all posts
0

Dev-mysql-maint error occurred during the installation of VHCS Control panel

Saturday, May 10, 2008

Error message:

Can’t connect on ‘DBI:mysql:;localhost’ :Access denied for user ‘debian-sys-maint’@'localhost’ (using password: YES)

The issue occurring due to the absence of grant privilege (to the user dev-mysql-maint) on the databases.

You obtain details of "dev-mysql-maint" from /etc/mysql/debian.cnf.

One example is mentioned below:

# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host = localhost
user = debian-sys-maint
password = 0nQp8g7pmupSbcpg
socket = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
user = debian-sys-maint
password = 0nQp8g7pmupSbcpg
socket = /var/run/mysqld/mysqld.sock
basedir = /usr

You need to grant the privileges to dev-mysql-maint, according to the above information.

grant all privileges to *.* on 'dev-mysql-maint'@'localhost' identified by '0nQp8g7pmupSbcpg' with grant option;

Note: Modify the password according to the information in /etc/mysql/debian.cnf.

0

Grant lock and temp table privilege

Wednesday, November 7, 2007

To grant the Lock table privilege:
mysql
use mysql;
show tables;
update db set Lock_tables_priv='Y' where Db="DatabaseName" and User="DatabaseUsername";
flush privileges;

To grant the Temp table privilege:
mysql
use mysql;
show tables;
update db set Create_tmp_table_priv='Y' where Db='DatabaseName' and User="DatabaseUsername";
flush privileges;

Make sure that you had given flush privileges.

Modify the DatabaseUsername and DatabaseName according to the requirement.

0

Checking Mysql queries User had opened

You can run the following to obatin how many mysql queries a user has open:
mysqladmin pr | awk -F\| {'print $3'} | sort -nk1 | awk -F_ {'print $1'} |uniq -c |sort

Run the following to check the database with the most queries:
mysqladmin pr | awk -F\| {'print $5'} | sort -nk1 |uniq -c |sort