Trace: » lamp_webserver

Login

You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.

Login

You don't have an account yet? Just get one: Register

Forgotten your password? Get a new one: Send new password

MySQL

Show Users
SELECT User,Password,Host FROM mysql.user;
Create User
CREATE USER user;
Set Passwords
SET PASSWORD FOR 'user'@'host' =PASSWORD('yourpassword');
Grant Privileges
GRANT ALL ON *.* TO 'user'@'host';

==Delete User==
<code>DELETE FROM mysql.user WHERE User='user' AND Host='host';
Dump a database at the command line
 mysqldump -u username --password=thepassword thedatabase > thedatabase.sql
Managing Log Size

Binary logs can become quite large in MySQL, so unless database replication is running, it’s often best to reduce the default logging.

in /etc/mysql/my.cnf reduce the length of time logs are stored for.

expire-log-days 3

If logs have built up, they can be removed from mysql command line

PURGE MASTER LOGS TO 'mysql-bin.010';

or

PURGE MASTER LOGS BEFORE '2003-04-02 22:46:26';