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

Sunday, September 09, 2012

list processes running in MySQL

login to mysql as a root:
mysql -uroot -p
end execute:
mysql> show processlist;
will show you list of processes running in MySQL
and using  \G delimiter will present processes in more readable format.
mysql> show processlist \G

Provided by: ForthScale systems, scalable infrastructure experts

Monday, May 23, 2011

Upgrading PHP in CentOS 5

CentOS 5.x comes with PHP 5.1, this version is outdated and you probably would want to upgrade it. I used Atomic repository.
You can add it by running following command:
wget -q -O - http://www.atomicorp.com/installers/atomic.sh | sh
Now you can update PHP:
yum update php
yum update php-mcrypt
(you might also need to update mysql)
Verify version of running PHP:
php -v
And that all modules working as order:
php -m
Restart Apache, you are all set.

Provided by:SiQ systems, Cloud experts

Sunday, May 22, 2011

"SQL Error: 13: Can't create/write to file" on other then /tmp directories (apparmor)

If you get SQL Error: 13 after changing tmpdir parameter in you my.cnf first check permissions in a new directory. If permissions are correct you might be having an issue with AppArmor. AppArmor is a GNU security module for the Linux kernel and it might prevent MySQL from writing to the new directory.
Run: aa-status
To verify if it`s on. If so you will get something like:
profiles are loaded
profiles are in enforce mode
Edit this file:
/etc/apparmor.d/usr.sbin.mysqld
and append your new temp directory in the end.
####
/usr/sbin/mysqld {
...
/new_tmp/ r,
/new_tmp/* rw,
}
Reload AppArmor with:
/etc/init.d/apparmor reload
Thats it.

Monday, April 06, 2009

Fix (repair) MySQL replication in case of duplicate items

If you as i am using MySQL replication mechanism, master-slave or master-master replication you sometimes loose replication due to duplicate entries.

You can fix it by simply skipping the record:
1. log into MySQL:
mysql -u root -p
2. in MySQL shell stop slave replication
mysql> STOP SLAVE;
3. skip the affected record
mysql> SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
4. start slave replication process
mysql> START SLAVE;
5. verify that replication is working:
mysql> SHOW SLAVE STATUS \G
6. exit MySQL shell:
mysql> quit;


Provided by:SiQ systems, Cloud experts

Wednesday, November 26, 2008

MySQL and debian-sys-maint account

If for some reason your debian-sys-maint account is unset in MySQL, during MySQL start you will have connect to server error. You might need to set this account in the MySQL server itself.
cat /etc/mysql/debian.cnf to get the password value from the file.
Then connect to the DB
mysql -u root -p
and execute:
GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'YOUR_PASSWORD' WITH GRANT OPTION

solving error: Your current user or role does not have access to Kubernetes objects on this EKS cluster.

Trying to access EKS cluster with kubectl you might get an error similar to: Your current user or role does not have access to Kubernetes ob...