Table of Contents

MySQL HOWTO

aptitude install mysql-server-5.0 mysql-client-5.0

To set the root password for connections from localhost:

mysqladmin -u root password yourpassword

To create a login for other users from other hosts:

mysql -u root -p
use mysql;
GRANT ALL PRIVILEGES ON *.* TO 'user'@'host.example.com' IDENTIFIED BY 'password' WITH GRANT OPTION;

Kill a MySQL Process

mysql -u username -p
kill 123456

Tuning MySQL

SET GLOBAL max_connections = 200;
SHOW VARIABLES LIKE '%max_connections%';
SHOW STATUS LIKE '%qcache%';